From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Lipe To: Jason Merrill Cc: egcs@cygnus.com Subject: Re: 1008 segfaults in genattr Date: Mon, 17 Nov 1997 21:11:00 -0000 Message-id: <19971117230951.45678@dgii.com> References: <19971117122406.16465@dgii.com> <19971117162101.41289.cygnus.egcs@dgii.com> X-SW-Source: 1997-11/msg00587.html Jason Merrill wrote: > >>>>> Robert Lipe writes: > > The problem is that "config/svr4.h" #defines HAVE_ATEXIT and nothing > > in config/i386/sysv4.h #undefs it. This is why we see the potentially > > goofy double exit thing on systems that are SVR4-ish on x86, which > > would certainly include Unixware. > > I don't understand. HAVE_ATEXIT has no effect whatsoever on the running of > dtors on ELF systems. What's the problem? But it does have at least one side effect. 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) 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. H.J. and I have asked for diassemblies, stack backtraces, and other hints from the original poster to better qualify this [ possibly unrelated ] problem.