public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Carsey, Jaben" <jaben.carsey@intel.com>
To: Alex James <theracermaster@gmail.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Subject: Re: [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit
Date: Wed, 2 Jan 2019 19:28:03 +0000	[thread overview]
Message-ID: <CB6E33457884FA40993F35157061515CB125CD92@FMSMSX103.amr.corp.intel.com> (raw)
In-Reply-To: <20181218042513.43232-3-theracermaster@gmail.com>

Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

And pushed.

> -----Original Message-----
> From: Alex James [mailto:theracermaster@gmail.com]
> Sent: Monday, December 17, 2018 8:25 PM
> To: edk2-devel@lists.01.org
> Cc: Daryl McDaniel <edk2-lists@mc2research.org>; Carsey, Jaben
> <jaben.carsey@intel.com>
> Subject: [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit
> Importance: High
> 
> 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



  reply	other threads:[~2019-01-02 19:28 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 ` [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit Alex James
2019-01-02 19:28   ` Carsey, Jaben [this message]
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=CB6E33457884FA40993F35157061515CB125CD92@FMSMSX103.amr.corp.intel.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