Use signals for activation injection on macOS (#46657)
authorJan Vorlicek <janvorli@microsoft.com>
Fri, 8 Jan 2021 16:34:37 +0000 (17:34 +0100)
committerGitHub <noreply@github.com>
Fri, 8 Jan 2021 16:34:37 +0000 (17:34 +0100)
commit099b0ca647aa42760f5d8ad8dbb1f49507ef2619
tree4c053b6bbedc8f3a2e96ff09d430cccccb637948
parentf2d388b2a9f371e9d64896df8d58a636b982e1c3
Use signals for activation injection on macOS (#46657)

This change moves macOS activation injection to the signal plan like it
works on other Unix platforms. The reason is that the activation injection
using thread suspension and thread redirection with helper frame can
collide with signal handlers on the same thread and result in a corrupted
stack frame. The issue can be reproduced by sending signals to the
.NET process from some other process while the .NET process is doing
a lot of GCs.
src/coreclr/pal/src/CMakeLists.txt
src/coreclr/pal/src/configure.cmake
src/coreclr/pal/src/exception/machexception.cpp
src/coreclr/pal/src/exception/signal.cpp
src/coreclr/pal/src/include/pal/context.h
src/coreclr/pal/src/thread/context.cpp