1008 segfaults in genattr

Jason Merrill jason@cygnus.com
Mon Nov 17 21:47:00 GMT 1997


>>>>> Robert Lipe <robertl@dgii.com> writes:

> Since on ELF systems the .fini stuff is generally implemented under
> the hood as a call to atexit(_fini) (see i386/sol2-c1.asm, others)

Ah...

> the presence of HAVE_ATEXIT() means we are also adding things to be
> called via atexit() and if the system doesn't cleanly handle the case
> of exit recursing, you can see problems like originally described with
> __do_global_dtors() being called twice if you call exit() from a global
> destructor.

I still don't see what this has to do with HAVE_ATEXIT.  It doesn't affect
crt1.o, so you have these problems either way.  exit() should remove
elements before calling them.

Jason



More information about the Gcc mailing list