mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Avoid crashes when profiling multi-threaded Lisp (bug#76970)
* src/eval.c (backtrace_p): Check 'current_thread' before dereferencing it.
This commit is contained in:
parent
c6c64d6da3
commit
fce86c7e95
1 changed files with 5 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue