This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Move signal blocking code into posix
AcceptedPublic

Authored by vitalybuka on Jul 26 2023, 5:10 PM.

Details

Summary

This will affect only Darwin, as the rest alredy do that.

Diff Detail

Event Timeline

vitalybuka created this revision.Jul 26 2023, 5:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2023, 5:10 PM
vitalybuka requested review of this revision.Jul 26 2023, 5:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 26 2023, 5:10 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Any concern?
Reproducing crashes without signal blocking is hard, we have tests which crashes 1 in 1M times.
So the question to reviewers is rather: does this regress anything on Darwin?

@kubamracek , do you have any historical context why this has been avoided so far in Darwin?

@kubamracek , do you have any historical context why this has been avoided so far in Darwin?

It was not avoided. It was used by msan, which is Linux only. And I just added this to Linux Asan as well. Without testing, I am not confident enabling this on Darwin.

@kubamracek , do you have any historical context why this has been avoided so far in Darwin?

It was not avoided. It was used by msan, which is Linux only. And I just added this to Linux Asan as well. Without testing, I am not confident enabling this on Darwin.

I can run tests today

@kubamracek , do you have any historical context why this has been avoided so far in Darwin?

It was not avoided. It was used by msan, which is Linux only. And I just added this to Linux Asan as well. Without testing, I am not confident enabling this on Darwin.

I can run tests today

If @vitalybuka is reasonably comfortable that testing in our CI will expose likely Darwin issues then I'm comfortable approving and just keeping an eye on it as it comes down into the automerger. If we need to do more testing than that, we should do what you suggest @thetruestblue and bring the diff down out-of-channel and do some more thorough testing first.

rsundahl accepted this revision.Sep 26 2023, 5:11 PM

ping

I applied this diff internally and at least as far as all of the tests run by

ninja check-runtimes

goes, there are no differences. I don't feel necessarily that I have any deep insight into why there should or should not be any subtle difference that would surface on macOS, but I also no longer want to be in the way of this one @vitalybuka. I'll keep an eye on it though and let you know if I see anything surprising.

This revision is now accepted and ready to land.Sep 26 2023, 5:11 PM
This revision was landed with ongoing or failed builds.Sep 26 2023, 5:45 PM
This revision was automatically updated to reflect the committed changes.
vitalybuka reopened this revision.Sep 26 2023, 9:11 PM
This revision is now accepted and ready to land.Sep 26 2023, 9:11 PM