This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: 1008 segfaults in genattr


> 
> Fascinating!  After a slow start, I'm glad to see this thread has
> caught on so well.  I'll include in this message a tar file which
> includes crtbegin.i and crtend.i; HJ - I hope you find these useful.

They look ok to me.

> 
> Jeff - here's the exact output of config.guess on my UnixWare 2.1.2
> machine: i386-pc-sysv4.2uw2.1.2
> 
> Jason - I don't know what to tell you other than what I've already
> posted; I don't know enough about the way the compiler is supposed to
> work to explain any of this to you, but here's what I have observed:
> 
>     1. Since (at least) the 10/08 snapshot, egcs has failed for me on
>        UnixWare. I had previously built releases successfully, up to
>        (I believe) 970910.  Initially, I observed this failure when
>        building genattr with the stage 1 compiler, but subsequently I
>        found that even the most basic "Hello World" program would
>        crash after having been built by the stage 1 compiler.

I think that indicates something else is wrong.

> 
>     2. The failure would exhibit itself as a fatal signal generated
>        when __do_global_dtors_aux was called for the 2nd time.

__do_global_dtors_aux is called via the .fini section. Unless
_fini (), the .fini section, is called twice, __do_global_dtors_aux
should not be called twice.

> 
>     3. Robert Lipe suggested that I #undef HAVE_ATEXIT, and this in
>        fact worked.  I could successfully bootstrap the latest
>        snapshot when I undefined HAVE_ATEXIT.
> 

I cannot image how HAVE_ATEXIT will affect the .fini section. From
what I have seen in source code and verified on my cross-compiler
to unixware, HAVE_ATEXIT should not affect the .fini section
nor __do_global_dtors_aux (). In your case, it does. That means
something went wrong.

HAVE_ATEXIT is only used in gbl-ctors.h, where it is used to
define ON_EXIT. If HAVE_ATEXIT is not defined, ON_EXIT won't
be defined. The only places where ON_EXIT will be used are
crtstuff.c and libgcc2.c. But crtstuff.c doesn't use ON_EXIT
for ELF. libgcc2 should not use ON_EXIT on unixware either.
But apparently for whatever reason, that is not the case for
you. Can you compare your libgcc2 before and after HAVE_ATEXIT
is undefined? Please tell us if there is a difference and
what the difference is.



H.J.


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