diff options
author | Alex James <theracermaster@gmail.com> | 2018-12-17 20:25:13 -0800 |
---|---|---|
committer | Jaben Carsey <jaben.carsey@intel.com> | 2019-01-02 11:26:21 -0800 |
commit | 19b0fc0a6b66f83154047a8ac43e66086e63610e (patch) | |
tree | dfcd4f058ab0033c6b94d5147faa6a0fbf21b759 /StdLib/LibC | |
parent | 5f5c60cc2d427cd953719dea9c57456a5d94d4ea (diff) | |
download | edk2-19b0fc0a6b66f83154047a8ac43e66086e63610e.tar.gz edk2-19b0fc0a6b66f83154047a8ac43e66086e63610e.tar.bz2 edk2-19b0fc0a6b66f83154047a8ac43e66086e63610e.zip |
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>
Diffstat (limited to 'StdLib/LibC')
-rw-r--r-- | StdLib/LibC/StdLib/Environs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/StdLib/LibC/StdLib/Environs.c b/StdLib/LibC/StdLib/Environs.c index 15221a1260..a29cb9954c 100644 --- a/StdLib/LibC/StdLib/Environs.c +++ b/StdLib/LibC/StdLib/Environs.c @@ -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.
#ifdef __GNUC__
- _Exit(status); /* Keep GCC happy - never reached */
+ __builtin_unreachable (); // Keep GCC happy
#endif
}
|