Browse Source

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 years ago
parent
commit
644898eabc
2 changed files with 2 additions and 2 deletions
  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
     CHAR8   *string
     );
     );
 
 
-INTN
+INTN EFIAPI
 DbgPrint (
 DbgPrint (
     INTN    mask,
     INTN    mask,
     CHAR8   *format,
     CHAR8   *format,

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

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