[PATCH] Declare functions that unconditionally call FatalError as _X_NORETURN.

Jeremy Huddleston jeremyhu at apple.com
Sat May 22 11:43:15 PDT 2010


Well, can't you turn off such optimizations with an -fno-omit-frame-pointer or something similar?

On May 22, 2010, at 11:32, Mark Kettenis wrote:

>> From: Jeremy Huddleston <jeremyhu at apple.com>
>> Date: Sat, 22 May 2010 09:17:27 -0700
>> 
>> On May 22, 2010, at 02:02, Mark Kettenis wrote:
>> 
>>>> From: Jamey Sharp <jamey at minilop.net>
>>>> Date: Fri, 21 May 2010 22:16:50 -0700
>>>> 
>>>> For AtomError, this should fix a clang warning; in the other cases it's
>>>> just good documentation.
>>> 
>>> Adding _X_NORETURN to a function will destroy the possibility to do
>>> backtraces from said function on many architectures.
>> 
>> Really?  Why is that?
> 
> Compiler developers use the fact that a function doesn't return as a
> license for optimizations that destroy the function return address or
> frame pointer.  It's especially nasty with GCC on arm, but there are
> other platforms where this is also a problem.
> 



More information about the xorg-devel mailing list