소스 검색

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,