mirror of
https://github.com/dart-lang/sdk
synced 2024-10-15 00:28:05 +00:00
[vm] Prevent nested handling of SIGPROF.
TEST=ci Bug: https://github.com/dart-lang/sdk/issues/52765 Change-Id: I14301d67ad245d3df96624155b383cb5f4c7f981 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310975 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
bbdf87d277
commit
b9843b876d
|
@ -122,6 +122,7 @@ void SignalHandler::Install(SignalAction action) {
|
|||
struct sigaction act = {};
|
||||
act.sa_sigaction = action;
|
||||
sigemptyset(&act.sa_mask);
|
||||
sigaddset(&act.sa_mask, SIGPROF); // Prevent nested signals.
|
||||
act.sa_flags = SA_RESTART | SA_SIGINFO | SA_ONSTACK;
|
||||
r = sigaction(SIGPROF, &act, nullptr);
|
||||
ASSERT(r == 0);
|
||||
|
|
|
@ -115,6 +115,7 @@ void SignalHandler::Install(SignalAction action) {
|
|||
act.sa_handler = nullptr;
|
||||
act.sa_sigaction = action;
|
||||
sigemptyset(&act.sa_mask);
|
||||
sigaddset(&act.sa_mask, SIGPROF); // Prevent nested signals.
|
||||
act.sa_flags = SA_RESTART | SA_SIGINFO;
|
||||
int r = sigaction(SIGPROF, &act, nullptr);
|
||||
ASSERT(r == 0);
|
||||
|
|
Loading…
Reference in a new issue