This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug ports/2682] 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: 22 May 2006 14:19:21 -0000
- Subject: [Bug ports/2682] On ARM EABI, exit should be marked EXIDX_CANTUNWIND
- References: <20060521225027.2682.jsm28@gcc.gnu.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From jsm28 at gcc dot gnu dot org 2006-05-22 14:19 -------
Marking destructor stops doesn't suffice since the same applies to functions
registered explicitly from atexit. Such functions can be called normally, and
throwing is then OK; they can be called from atexit, when throwing must result
in terminate being called.
Thanks for the x86_64 pointer, here's an example which does fail there. (The
indirection about how and when exit is called is to avoid problems with the
compiler knowing that exit can't throw.)
#include <stdlib.h>
#include <stdio.h>
void f(void)
{
puts("in atexit handler");
throw "s";
}
volatile int v;
void e(void)
{
if (v)
throw "s";
exit (0);
}
int main(void)
{
atexit(f);
try {
e ();
} catch (...) {
puts ("caught");
abort ();
}
}
--
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.