Subject: Re: bug#76970: 31.0.50; master emacs crash with stack overflow

From: Pip Cet <[email-masked]>
Date: Wed, 12 Mar 2025 16:21:52 +0000

"Eli Zaretskii" <[email-masked]> writes:

>> From: Eval Exec <[email-masked]>
>> Date: Wed, 12 Mar 2025 10:43:59 +0800
>>
>>
>> Hello, I got a master branch emacs crash:
>>
>> (gdb) bt full
>> #0  0x000000000055979e in stack_overflow (siginfo=0x85d1b0 <sigsegv_stack+62640>) at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/sysdep.c:1895
>>         addr = 0x70 <error: Cannot access memory at address 0x70>
>>         bot = <optimized out>
>>         top = <optimized out>
>>         LG_STACK_HEURISTIC = LG_STACK_HEURISTIC
>> #1 handle_sigsegv (sig=11, siginfo=0x85d1b0 <sigsegv_stack+62640>,
>> arg=<optimized out>) at
>> /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/sysdep.c:1930
>>         fatal = false
>> #2  <signal handler called>
>> No symbol table info available.
>> #3  backtrace_top () at /home/exec/Projects/git.savannah.gnu.org/git/emacs/src/eval.c:174
>>         pdl = <optimized out>
>>         pdl = <optimized out>

That looks like current_thread was NULL, and there was no stack overflow
at all.  It looks like this can happen when running several Lisp
threads while profiling is in use, but it's not trivial to trigger.

Pip