This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug ports/2682] New: On ARM EABI, exit should be marked EXIDX_CANTUNWIND
- From: "jsm28 at gcc dot gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 21 May 2006 22:50:27 -0000
- Subject: [Bug ports/2682] New: On ARM EABI, exit should be marked EXIDX_CANTUNWIND
- Reply-to: sourceware-bugzilla at sourceware dot org
On ARM EABI, the function "exit" needs to be marked with EXIDX_CANTUNWIND so
that exceptions thrown from functions registered with atexit properly stop
unwinding at that point.
This may need a GCC change to add a "nounwind" attribute so that C functions can
be marked that way. (_start is defined in assembly with ".cantunwind" which
deals with the true end of the stack, but that doesn't suffice; the C++ standard
requires unwinding to stop and terminate to be called on leaving an atexit
function.)
The C++ testcase is as follows; it should call "terminate" but instead segfaults.
extern "C" int puts(const char *);
struct S
{
int i;
S() : i(0) { }
~S()
{
puts("dtor");
throw "s"; // no handler anywhere
}
};
S xo;
int main(int argc, char *argv[])
{
puts("main");
return 0;
}
--
Summary: On ARM EABI, exit should be marked EXIDX_CANTUNWIND
Product: glibc
Version: 2.4
Status: NEW
Severity: normal
Priority: P2
Component: ports
AssignedTo: roland at gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
CC: glibc-bugs at sources dot redhat dot com
GCC target triplet: arm-*-linux-gnueabi
http://sourceware.org/bugzilla/show_bug.cgi?id=2682
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.