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

From: Eval Exec <[email-masked]>
Date: Tue, 18 Mar 2025 12:04:22 +0800

Hello, Pip ,could you please merge master into feature/igc branch again?
Thank you.

On Thu, Mar 13, 2025, 00:22 Pip Cet <[email-masked]> wrote:

> "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
>
>