This is an archive of the discontinued LLVM Phabricator instance.

[asan] Also allow for SIGBUS in high-address-dereference.c
ClosedPublic

Authored by arichardson on Aug 6 2020, 1:26 AM.

Details

Summary

FreeBSD delivers a SIGBUS signal for bad addresses rather than SIGSEGV.

Diff Detail

Event Timeline

arichardson created this revision.Aug 6 2020, 1:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 6 2020, 1:26 AM
arichardson requested review of this revision.Aug 6 2020, 1:26 AM
yln added inline comments.
compiler-rt/lib/sanitizer_common/sanitizer_posix.cpp
296

Quick question: should the SIGBUS part be behind a #ifdef for FreeBSD to limit unwanted interactions?

arichardson added inline comments.Aug 6 2020, 10:01 AM
compiler-rt/lib/sanitizer_common/sanitizer_posix.cpp
296

I could split this out, but as far as I am aware SIGBUS is only ever raise for memory acceses (e.g. unaligned loads/stores).

yln accepted this revision.Aug 6 2020, 10:12 AM

LGTM, thanks!
I still would feel more comfortable to get a second opinion. Maybe @vitalybuka can comment?

This revision is now accepted and ready to land.Aug 6 2020, 10:12 AM
vitalybuka accepted this revision.Aug 18 2020, 3:26 AM
This revision was landed with ongoing or failed builds.Aug 25 2020, 4:21 AM
This revision was automatically updated to reflect the committed changes.