Subject: bug#24682: 26.0.50; Bootstrap failed

From: Michael Albinus <[email-masked]>
Date: Fri, 14 Oct 2016 17:33:53 +0200

Eli Zaretskii <[email-masked]> writes:

>> Program received signal SIGSEGV, Segmentation fault.
>> __memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:130
>> 130	../sysdeps/x86_64/multiarch/memcpy-ssse3.S: No such file or directory.
>> (gdb) bt
>> #0  __memcpy_ssse3 () at ../sysdeps/x86_64/multiarch/memcpy-ssse3.S:130
>> #1  0x0000555555707f8b in memcpy (__len=1465781148, __src=0x781464, 
>>     __dest=0x7fff8fc1a464) at /usr/include/x86_64-linux-gnu/bits/string3.h:53
>> #2  unexec (
>>     new_name=0x555557049248 <bss_sbrk_buffer+19825800>
>> "/usr/local/src/emacs/src/emacs",
>>     old_name=0x555557049270 <bss_sbrk_buffer+19825840>
>> "/usr/local/src/emacs/src/temacs") at unexelf.c:406
>> #3  0x000055555565bea7 in Fdump_emacs (filename=93825020178884, 
>>     symfile=<optimized out>) at emacs.c:2157
>
> Isn't the value of __len (about 1.4GB) too large?  unexelf.c:406 is
> this:
>
>   /* Copy over what we have in memory now for the bss area. */
>   memcpy (new_base + new_data2_offset, (caddr_t) old_bss_addr,
> 	  bss_size_growth);
>
> So bss_size_growth is about 1.4GB, which sounds incredibly large.
>
> the value is computed on line 334, can you tell the values of the two
> variables that get subtracted there?

The values of local variables are (taken from *locals of temacs*)

int          new_file          6
int          old_file          5
off_t        new_file_size     1487902352
caddr_t      old_base          0x7fffe8193000 "\177ELF\002\001\001"
caddr_t      new_base          0x7fff8f699000 "\177ELF\002\001\001"
Elf64_Ehdr * old_file_h        0x7fffe8193000
Elf64_Ehdr * new_file_h        0x7fff8f699000
Elf64_Phdr * old_program_h     0x7fffe8193040
Elf64_Phdr * new_program_h     <optimized out>
Elf64_Shdr * old_section_h     0x7fffe96aaff0
Elf64_Shdr * new_section_h     0x7fffe8191b90
char *       old_section_names 0x7fffe96aae5f ""
char *       new_section_names <optimized out>
Elf64_Phdr * old_bss_seg       <optimized out>
Elf64_Phdr * new_bss_seg       0x7fff8f6990e8
Elf64_Addr   old_bss_addr      7869540
Elf64_Addr   new_bss_addr      93825034231808
Elf64_Word   old_bss_size      <optimized out>
Elf64_Word   bss_size_growth   1465781148
Elf64_Word   new_data2_size    1465781152
Elf64_Off    old_bss_offset    5772388
Elf64_Off    new_data2_offset  5772388
ptrdiff_t    n                 <optimized out>
ptrdiff_t    old_bss_index     31
struct stat  stat_buf          <complex data type>
off_t        old_file_size     22121200