瀏覽代碼

The prototype of DbgPrint() is incorrect, at the end of "inc/efidebug.h".
Consequently, when your program calls DbgPrint() via the DEBUG() macro,
it fails to set up the stack correctly (it does not pass the arguments
through the ellipsis (...) according to the EFIAPI calling convention).
However, va_start() inside DbgPrint() *assumes* that stack.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>

Nigel Croxon 11 年之前
父節點
當前提交
644898eabc
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      gnu-efi-3.0/inc/efidebug.h
  2. 1 1
      gnu-efi-3.0/lib/print.c

+ 1 - 1
gnu-efi-3.0/inc/efidebug.h

@@ -99,7 +99,7 @@ DbgAssert (
     CHAR8   *string
     );
 
-INTN
+INTN EFIAPI
 DbgPrint (
     INTN    mask,
     CHAR8   *format,

+ 1 - 1
gnu-efi-3.0/lib/print.c

@@ -179,7 +179,7 @@ _PoolPrint (
     IN CHAR16   *Buffer
     );
 
-INTN
+INTN EFIAPI
 DbgPrint (
     IN INTN      mask,
     IN CHAR8     *fmt,