This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: more on the emacs-20.3 segfault


> Mailing-List: contact libc-hacker-help@sourceware.cygnus.com; run by ezmlm
> Date: 28 May 1999 10:10:03 -0000
> From: Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
> CC: libc-hacker@sourceware.cygnus.com, pbg1854@garnet.acns.fsu.edu
> 
> Hello,
> 
> > Further suggestions gladly accepted.  I have no clue whether 
> > this is more likely emacs's or glibc's problem (or even the 
> > kernel: Peter and I are running 2.2 while Wolfram has 2.0).  
> 
> Ah, the joys of the emacs dumping procedure !  Here's what I think
> happens:
> 
> 1 Emacs dumped executable starts up, loads ld-linux.so.2/libc.so.6
> 
> 2 The dynamic loader of glibc invokes atexit(), which uses malloc()
>   (this is new in glibc-2.1.1, I think; previous versions didn't
>    use malloc so early)

Note that glibc must not call malloc(), or getenv() which malloc()
calls, before the executable's crt0 has run, or things will go wrong;
if one of these routines are in the executable, which is unfortunately
much more common than it should be, `things' may include a segfault on
powerpc.

I found this problem while trying to make .so profiling work on
powerpc.  (I've fixed that problem, I think, but there's still more to
do.)

-- 
Geoffrey Keating <geoffk@ozemail.com.au>

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