This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizers][Darwin] Add READ/WRITE detection on arm64 for darwin.
ClosedPublic

Authored by thetruestblue on May 11 2022, 1:46 PM.

Details

Summary

On arm64 the read/write flag is set on the esr register. Adding this flag check for arm64 enables a more accurate print out for sanitizer signal reports and matches the behavior on x86.

Fixes bug: https://github.com/llvm/llvm-project/issues/27917

These tests are now passing on for asan, tsan, and ubsan on Darwin arm64 and arm64e:

		Posix/illegal_read_test.cpp
		Posix/illegal_write_test.cpp

rdar://92104440

Diff Detail

Event Timeline

thetruestblue created this revision.May 11 2022, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2022, 1:46 PM
thetruestblue requested review of this revision.May 11 2022, 1:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2022, 1:46 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
thetruestblue edited the summary of this revision. (Show Details)May 11 2022, 1:51 PM

Found macro name for arm64 esr WNR mask

thetruestblue edited the summary of this revision. (Show Details)May 11 2022, 1:59 PM
yln added a comment.May 12 2022, 9:50 AM

Great, thanks!

llvm issues now live on Github. Here is the imported one from the Bugzilla: https://github.com/llvm/llvm-project/issues/27917
You can make yourself the Assignee, leave a reference to this revision in a comment, and close the issue.

yln accepted this revision.May 12 2022, 9:51 AM
This revision is now accepted and ready to land.May 12 2022, 9:51 AM
yln added a reviewer: wrotki.May 12 2022, 9:51 AM
This revision was landed with ongoing or failed builds.May 12 2022, 10:53 AM
This revision was automatically updated to reflect the committed changes.
thetruestblue edited the summary of this revision. (Show Details)Mar 7 2023, 9:49 AM
thetruestblue edited the summary of this revision. (Show Details)Mar 7 2023, 9:51 AM
thetruestblue edited the summary of this revision. (Show Details)Mar 7 2023, 9:55 AM