Subject: bug#19959: 25.0.50; can't bootstrap -- temacs dumps core

From: Thomas Fitzsimmons <[email-masked]>
Date: Tue, 03 Mar 2015 11:23:28 -0500

Glenn Morris <[email-masked]> writes:

> Nicolas Richard wrote:
>
>> In GNU Emacs 25.0.50.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
>
> FWIW, http://hydra.nixos.org/build/19982110 flagged this yesterday.
> It seems to be specific to 32-bit builds.
> (The precise introduction is masked by the previous total build failure
> due to a typo.)

This commit breaks bootstrap for me:

commit b74db6347cf5cac1ebd4c604fd5691c588fd8e32
Author: Paul Eggert <[email-masked]>
Date:   Tue Feb 24 16:34:13 2015 -0800

    Backtrace after malloc arena is corrupted
    
    Without this change, if the malloc arena is corrupted and then
    'backtrace' is called, the backtrace can crash because 'backtrace'
    calls 'malloc'.  For more, please see:
    https://sourceware.org/ml/libc-alpha/2015-02/msg00678.html
    * emacs.c (main): Initialize tables used by 'backtrace'.
    * sysdep.c (emacs_backtrace): Document the newly used part of the API.

On my system's glibc version, glibc-2.16-30.fc18.i686, it seems that a
zero size argument to backtrace causes a segfault; minimal example
attached:

$ gcc -Wall backtrace.c
$ env -i ./a.out
Segmentation fault (core dumped)

Thomas