Subject: bug#20431: emacs-24.5 segfaults with gnutls-3.4.0

From: Ted Zlatanov <[email-masked]>
Date: Mon, 04 May 2015 18:13:01 -0400

On Sun, 26 Apr 2015 14:23:46 -0300 Fernando de Oliveira <[email-masked]> wrote: 

FdO> I am having this segfault problem and could not solve by myself.
...
FdO> Build log tail with the error (I1ve replaced "Falha de segmentação" by
FdO> "Segmentation fault":
...

Hi Fernando,

I don't know if the problem is in the GnuTLS integration from this stack
trace, but I'm definitely not seeing it here. Is it still happening for
you? Can you replicate it with the released 24.4? How about the latest
(Git master branch)?

Thanks
Ted

FdO> Program received signal SIGSEGV, Segmentation fault.
FdO> 0x00007ffff0ef2f24 in free () from /lib/libc.so.6
FdO> (gdb) bt
FdO> #0  0x00007ffff0ef2f24 in free () from /lib/libc.so.6
FdO> #1  0x00007ffff168e84b in _gnutls_ext_deinit () at gnutls_extensions.c:399
FdO> #2  0x00007ffff1695a40 in _gnutls_global_deinit (destructor=1)
FdO>     at gnutls_global.c:385
FdO> #3  0x00007ffff7dea727 in _dl_fini () from /lib64/ld-linux-x86-64.so.2
FdO> #4  0x00007ffff0eadd92 in __run_exit_handlers () from /lib/libc.so.6
FdO> #5  0x00007ffff0eadde5 in exit () from /lib/libc.so.6
FdO> #6  0x00000000004e7dec in Fkill_emacs (arg=<optimized out>) at emacs.c:1970
FdO> #7  0x0000000000557771 in eval_sub (form=<optimized out>) at eval.c:2181
FdO> #8  0x0000000000557b85 in Fprogn (body=140737238883328) at eval.c:462
FdO> #9  0x00000000005577c6 in eval_sub (form=<optimized out>) at eval.c:2131
FdO> #10 0x00000000005577c6 in eval_sub (form=form@entry=12540550) at eval.c:2131
FdO> #11 0x000000000057a4e3 in readevalloop (readcharfun=12398610,
FdO> stream=0xc06100,
FdO>     sourcename=12603889, printflag=false, unibyte=<optimized out>,
FdO>     readfun=12279666, start=12279666, end=12279666) at lread.c:1934
FdO> #12 0x000000000057b2ba in Fload (file=140737238883328, noerror=0,
FdO>     nomessage=12279666, nosuffix=12603889, must_suffix=0) at lread.c:1363
FdO> #13 0x0000000000557715 in eval_sub (form=form@entry=12540438) at eval.c:2195
FdO> #14 0x00000000005599d4 in Feval (form=12540438, lexical=<optimized out>)
FdO>     at eval.c:1996
FdO> #15 0x00000000005566a7 in internal_condition_case (
FdO>     bfun=bfun@entry=0x4e83a0 <top_level_2>, handlers=<optimized out>,
FdO>     hfun=hfun@entry=0x4ecb80 <cmd_error>) at eval.c:1348
FdO> #16 0x00000000004e8376 in top_level_1 (ignore=ignore@entry=12279666)
FdO>     at keyboard.c:1195
FdO> ---Type <return> to continue, or q <return> to quit---
FdO> #17 0x000000000055658b in internal_catch (tag=12326946,
FdO>     func=func@entry=0x4e8310 <top_level_1>, arg=12279666) at eval.c:1112
FdO> #18 0x00000000004ec77f in command_loop () at keyboard.c:1156
FdO> #19 recursive_edit_1 () at keyboard.c:778
FdO> #20 0x00000000004ecab0 in Frecursive_edit () at keyboard.c:849
FdO> #21 0x00000000004199a9 in main (argc=12603633, argv=0x7fffffffdec8)
FdO>     at emacs.c:1642