public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ports/2682] New: On ARM EABI, exit should be marked EXIDX_CANTUNWIND
@ 2006-05-21 22:50 jsm28 at gcc dot gnu dot org
  2006-05-22  3:43 ` [Bug ports/2682] " drow at sources dot redhat dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2006-05-21 22:50 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-09-09 18:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-21 22:50 [Bug ports/2682] New: On ARM EABI, exit should be marked EXIDX_CANTUNWIND jsm28 at gcc dot gnu dot org
2006-05-22  3:43 ` [Bug ports/2682] " drow at sources dot redhat dot com
2006-05-22 11:34 ` jsm28 at gcc dot gnu dot org
2006-05-22 13:56 ` drow at sources dot redhat dot com
2006-05-22 14:19 ` jsm28 at gcc dot gnu dot org
2006-05-22 14:23 ` [Bug libc/2682] " drow at sources dot redhat dot com
2006-05-22 14:35 ` jsm28 at gcc dot gnu dot org
2006-05-22 14:45 ` drow at sources dot redhat dot com
2006-09-09 17:11 ` [Bug ports/2682] " drepper at redhat dot com
2006-09-09 18:25 ` drow at sources dot redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).