From: Alex James <theracermaster@gmail.com>
To: edk2-devel@lists.01.org
Cc: Daryl McDaniel <edk2-lists@mc2research.org>,
Jaben Carsey <jaben.carsey@intel.com>
Subject: [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit
Date: Mon, 17 Dec 2018 22:25:13 -0600 [thread overview]
Message-ID: <20181218042513.43232-3-theracermaster@gmail.com> (raw)
In-Reply-To: <20181218042513.43232-1-theracermaster@gmail.com>
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>
---
StdLib/LibC/StdLib/Environs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
}
--
2.20.1
next prev parent reply other threads:[~2018-12-18 4:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 4:25 [PATCH v1 0/2] Fix StdLib compilation with XCODE5/CLANG38 Alex James
2018-12-18 4:25 ` [PATCH v1 1/2] StdLib/sys/termios: Define cc_t as unsigned Alex James
2018-12-18 4:25 ` Alex James [this message]
2019-01-02 19:28 ` [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit Carsey, Jaben
2019-01-02 19:28 ` Carsey, Jaben
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181218042513.43232-3-theracermaster@gmail.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox