diff options
| author | Pip Cet <pipcet@protonmail.com> | 2025-07-12 10:22:01 +0000 |
|---|---|---|
| committer | Pip Cet <pipcet@protonmail.com> | 2025-07-12 10:24:11 +0000 |
| commit | fce86c7e9523b9b6c29241ae9d1dea340f0d849c (patch) | |
| tree | 9555ccd2371da2a00f572700466628b910c72013 /src/eval.c | |
| parent | c6c64d6da3ea48887c95ef978095ca643480cc15 (diff) | |
Avoid crashes when profiling multi-threaded Lisp (bug#76970)
* src/eval.c (backtrace_p): Check 'current_thread' before
dereferencing it.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 4c514001d9d..5e2b5bff796 100644 --- a/src/eval.c +++ b/src/eval.c @@ -159,7 +159,11 @@ set_backtrace_debug_on_exit (union specbinding *pdl, bool doe) bool backtrace_p (union specbinding *pdl) -{ return specpdl ? pdl >= specpdl : false; } +{ + if (current_thread && specpdl && pdl) + return pdl >= specpdl; + return false; +} static bool backtrace_thread_p (struct thread_state *tstate, union specbinding *pdl) |
