This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/6522] abort should not be marked noreturn


------- Additional Comments From dak at gnu dot org  2008-06-17 11:54 -------
(In reply to comment #8)
> Removing noreturn from abort will not eliminate the problem, the compiler will 
> still combine two calls if they appear in similar enough contexts.

Quite correct.  However, this will occur at a junction of the code paths with
compatible and recognizable stack frame.  So the inconvenience is more or less
"par for optimization".  You will still be able to examine variable values (even
if they move through registers) and figure out what function you are in.

The optimal solution would, as I stated at the bottom of comment #4, introduce
some attribute that could effectively enable -fno-crossjumping for abort calls
only.  In that manner, the "noreturn" optimizations would have a chance to be
tracked by debugging information since the return address would uniquely
identify the context of the stack frame.

This would require work in the compiler and might be the most elegant solution
in the long run.  Leaving off "noreturn" in the meantime would provide an
expedience that gets rid of the most productivity-wasting artifacts.

If nothing is done at all, at least the GCC documentation would warrant a strong
warning about the particular effects of the (standard for -O) -fcrossjumping
option on post mortem debugging.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=6522

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]