mirror of https://github.com/acidanthera/audk.git
StdLib/Environs: Avoid infinite recursion in _Exit
Use __builtin_unreachable instead of infinite recursion to fix an infinite recursion error when building StdLib with XCODE5/CLANG38. Cc: Daryl McDaniel <edk2-lists@mc2research.org> Cc: Jaben Carsey <jaben.carsey@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Alex James <theracermaster@gmail.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
This commit is contained in:
parent
5f5c60cc2d
commit
19b0fc0a6b
|
@ -120,7 +120,7 @@ _Exit(int status)
|
||||||
longjmp(gMD->MainExit, 0x55); // Get out of here. longjmp can't return 0. Use 0x55 for a non-zero value.
|
longjmp(gMD->MainExit, 0x55); // Get out of here. longjmp can't return 0. Use 0x55 for a non-zero value.
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
_Exit(status); /* Keep GCC happy - never reached */
|
__builtin_unreachable (); // Keep GCC happy
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue