mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
linux-user: Fix guest signal remapping after adjusting SIGABRT
The arithmetic within the loop was not adjusted properly after SIGRTMIN
was stolen for the guest SIGABRT. The effect was that the guest libc
could not send itself __SIGRTMIN to wake sleeping threads.
Fixes: 38ee0a7dfb ("linux-user: Remap guest SIGABRT")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1967
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
@@ -536,11 +536,10 @@ static void signal_table_init(void)
|
|||||||
host_to_target_signal_table[SIGABRT] = 0;
|
host_to_target_signal_table[SIGABRT] = 0;
|
||||||
host_to_target_signal_table[hsig++] = TARGET_SIGABRT;
|
host_to_target_signal_table[hsig++] = TARGET_SIGABRT;
|
||||||
|
|
||||||
for (; hsig <= SIGRTMAX; hsig++) {
|
for (tsig = TARGET_SIGRTMIN;
|
||||||
tsig = hsig - SIGRTMIN + TARGET_SIGRTMIN;
|
hsig <= SIGRTMAX && tsig <= TARGET_NSIG;
|
||||||
if (tsig <= TARGET_NSIG) {
|
hsig++, tsig++) {
|
||||||
host_to_target_signal_table[hsig] = tsig;
|
host_to_target_signal_table[hsig] = tsig;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Invert the mapping that has already been assigned. */
|
/* Invert the mapping that has already been assigned. */
|
||||||
|
|||||||
Reference in New Issue
Block a user