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 ports/2682] On ARM EABI, exit should be marked EXIDX_CANTUNWIND


------- 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.


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