This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

Re: [Luc.Maisonobe@c-s.fr: Re: emacs dumps core on exit under solaris 2.8]


Richard Stallman <rms@gnu.org> writes:

> He is using GCC 3.2, he said in another message.  A crash directly in
> __do_global_dtors_aux suggests a GCC bug.  Could someone please look at this,
> and maybe work with him to find what is really wrong?

Typically, crashes in constructor/destructor routines mean linker or
loader problems.  Since this is emacs, the most likely problem is
something involving the undump mechanism.

On ELF, __do_global_dtors_aux runs through a list stored in the .dtors
section.  So, things to check in order are:

- Look at the global symbols __DTOR_LIST__ and __DTOR_END__.  Do they
  point to the first and last words in the .dtors section?

- Look at the contents of the .dtors section using 'objdump -j .dtors
  -s'.  Assuming emacs doesn't actually use destructors, it should
  look like

Contents of section .dtors:
 80c3510 ffffffff 00000000                    ........

If it contains additional information, check that those pointers are
valid procedure pointers.  Check that it still starts with -1 and ends
with 0.

- In the debugger, check that the .dtors section did get loaded at the
  proper address and contains the same contents as on disk.

- In the debugger, check that the addresses __do_global_dtors_aux goes
  through are actually the ones in the .dtors section.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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