This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 1008 segfaults in genattr
- To: Jason Merrill <jason at cygnus dot com>
- Subject: Re: 1008 segfaults in genattr
- From: Robert Lipe <robertl at dgii dot com>
- Date: Mon, 17 Nov 1997 23:09:51 -0600
- Cc: egcs at cygnus dot com
- References: <19971117122406.16465@dgii.com> <19971117162101.41289.cygnus.egcs@dgii.com> <u9200fnefx.fsf@yorick.cygnus.com>
Jason Merrill wrote:
> >>>>> Robert Lipe <robertl@dgii.com> 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.