On 7/25/19 6:16 AM, Peter Maydell wrote: > The alternate signal stack set up by the sigaltstack syscall is > supposed to be per-thread. We were incorrectly implementing it as > process-wide. This causes problems for guest binaries that rely on > this. Notably the Go runtime does, and so we were seeing crashes > caused by races where two guest threads might incorrectly both > execute on the same stack simultaneously. > > Replace the global target_sigaltstack_used with a field > sigaltstack_used in the TaskState, and make all the references to the > old global instead get a pointer to the TaskState and use the field. > > Fixes: https://bugs.launchpad.net/qemu/+bug/1696773 > Signed-off-by: Peter Maydell <[email protected]> > ---
Reviewed-by: Richard Henderson <[email protected]> r~
