diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-10-03 22:52:49 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-10-03 22:52:49 -0700 |
commit | 88d69b7ddca305bb96d6e671300f6724e4f147dd (patch) | |
tree | b2ee21fefc1376198029fba154c658c9b2cdf90f /src/profiler.c | |
parent | 2b794d6940aa7dc58e297b3649b7799190d71f64 (diff) | |
download | emacs-88d69b7ddca305bb96d6e671300f6724e4f147dd.tar.gz emacs-88d69b7ddca305bb96d6e671300f6724e4f147dd.tar.bz2 emacs-88d69b7ddca305bb96d6e671300f6724e4f147dd.zip |
* profiler.c (handle_profiler_signal): Inhibit pending signals too,
to avoid similar races.
* keyboard.c (pending_signals): Now bool, not int.
Diffstat (limited to 'src/profiler.c')
-rw-r--r-- | src/profiler.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/profiler.c b/src/profiler.c index 461aae3e09f..51580710f28 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -239,6 +239,7 @@ handle_profiler_signal (int signal) else { Lisp_Object oquit; + bool saved_pending_signals; EMACS_INT count = 1; #ifdef HAVE_ITIMERSPEC if (profiler_timer_ok) @@ -252,12 +253,15 @@ handle_profiler_signal (int signal) uses QUIT, which can call malloc, which can cause disaster in a signal handler. So inhibit QUIT. */ oquit = Vinhibit_quit; + saved_pending_signals = pending_signals; Vinhibit_quit = Qt; + pending_signals = 0; eassert (HASH_TABLE_P (cpu_log)); record_backtrace (XHASH_TABLE (cpu_log), count); Vinhibit_quit = oquit; + pending_signals = saved_pending_signals; } } |