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

Mark Kettenis mark.kettenis at xs4all.nl
Sat May 22 11:32:52 PDT 2010


> 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