Subject: Re: bug#10240: GNUstep build fails during dumping

From: Eli Zaretskii <[email-masked]>
Date: Wed, 07 Dec 2011 03:04:06 -0500

> From: Glenn Morris <[email-masked]>
> Date: Wed, 07 Dec 2011 02:47:11 -0500
> 
> With an up-to-date Debian testing system, configure --with-ns fails
> trying to dump bootstrap-emacs. The odd thing is, this is repeatable
> every time, yet if I run the "./temacs -batch -load loadup bootstrap"
> command by hand outside of make, it works fine (every time). A non-ns
> build on the same system works fine.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x00002aaaaef60fe0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> #0  0x00002aaaaef60fe0 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
> No symbol table info available.
> #1  0x000000000063992d in unexec (new_name=0x1ac6460 "/tmp/emacs/src/emacs", old_name=0x1ac64a0 "/tmp/emacs/src/temacs") at unexelf.c:1224
>         old = 0x2aaab56fcc39 <Address 0x2aaab56fcc39 out of bounds>
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Isn't this the root cause?  The line where it crashes is this:

	      memcpy (new, old, symp->st_size);

So if `old' is invalid...