diff options
| author | Eli Zaretskii | 2025-06-21 11:53:24 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-06-21 11:53:24 +0300 |
| commit | dd95447b05eb2e86e0500d953f43213df028c19a (patch) | |
| tree | 16ee3907020f2049ff51cecce8e229e6c0575117 /src/eval.c | |
| parent | 075ebed98fea274b363d4d015b32edb0a12a9a89 (diff) | |
| download | emacs-dd95447b05eb2e86e0500d953f43213df028c19a.tar.gz emacs-dd95447b05eb2e86e0500d953f43213df028c19a.zip | |
Avoid segfault when profiling Lisp programs with threads
* src/eval.c (backtrace_top): Don't segfault if current_thread is
NULL. (Bug#76970)
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 46705dc4543..4c514001d9d 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -171,7 +171,7 @@ backtrace_top (void) | |||
| 171 | /* This is so "xbacktrace" doesn't crash in pdumped Emacs if they | 171 | /* This is so "xbacktrace" doesn't crash in pdumped Emacs if they |
| 172 | invoke the command before init_eval_once_for_pdumper initializes | 172 | invoke the command before init_eval_once_for_pdumper initializes |
| 173 | specpdl machinery. See also backtrace_p above. */ | 173 | specpdl machinery. See also backtrace_p above. */ |
| 174 | if (!specpdl) | 174 | if (!current_thread || !specpdl) |
| 175 | return NULL; | 175 | return NULL; |
| 176 | 176 | ||
| 177 | union specbinding *pdl = specpdl_ptr - 1; | 177 | union specbinding *pdl = specpdl_ptr - 1; |