Skip to content
Commit c0e912dd authored by Dmitry Vyukov's avatar Dmitry Vyukov
Browse files

tsan: fix PTRACE_ATTACH handling during stop-the-world

If the thread receives a signal concurrently with PTRACE_ATTACH,
we can get notification about the signal before notification about stop.
In such case we need to forward the signal to the thread, otherwise
the signal will be missed (as we do PTRACE_DETACH with arg=0) and
any logic relying on signals will break. After forwarding we need to
continue to wait for stopping, because the thread is not stopped yet.
We do ignore delivery of SIGSTOP, because we want to make stop-the-world
as invisible as possible.

http://reviews.llvm.org/D7723

 --This line, and those below, will be ignored--
M    lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
M    test/tsan/signal_segv_handler.cc

llvm-svn: 229832
parent ba5b04c7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment