diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2016-07-28 16:44:45 +0100 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2016-09-21 21:51:49 +0300 |
commit | 8bd3773cce1885c46e5cf09a72b9138ccba5fbf2 (patch) | |
tree | 1ec26bf99612405b5c9ed502b274268123c54ea2 /linux-user/signal.c | |
parent | c836112997e19966565cd6eb68e0836c8972720b (diff) |
linux-user: Recheck for pending synchronous signals too
In process_pending_signals() we restart the scan of possible
pending signals after calling handle_pending_signal() in
case some other signal has been generated. This rescan
should also include a check for a new synchronous signal
since those are in fact the only kind of new signal that
the signal frame setup process might produce.
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r-- | linux-user/signal.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c index 3337f1e563..f2c9f8e474 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -5925,6 +5925,7 @@ void process_pending_signals(CPUArchState *cpu_env) sigfillset(&set); sigprocmask(SIG_SETMASK, &set, 0); + restart_scan: sig = ts->sync_signal.pending; if (sig) { /* Synchronous signals are forced, @@ -5952,8 +5953,10 @@ void process_pending_signals(CPUArchState *cpu_env) (!sigismember(blocked_set, target_to_host_signal_table[sig]))) { handle_pending_signal(cpu_env, sig, &ts->sigtab[sig - 1]); - /* Restart scan from the beginning */ - sig = 1; + /* Restart scan from the beginning, as handle_pending_signal + * might have resulted in a new synchronous signal (eg SIGSEGV). + */ + goto restart_scan; } } |