This is an archive of the discontinued LLVM Phabricator instance.

[asan] Split SIGSEGV/SIGBUS handling so we can handle only one of them and not the other.
ClosedPublic

Authored by filcab on Mar 9 2017, 7:51 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

filcab created this revision.Mar 9 2017, 7:51 AM
kcc edited edge metadata.Mar 9 2017, 7:05 PM

what are those platforms and can we have at the very least tests for those platforms?
(Also, would be nice to have tests for linux/mac, but frankly I don't remember how to cause a SIGBUS on linux)

filcab updated this revision to Diff 91383.Mar 10 2017, 11:30 AM

Added a test for POSIX systems.

filcab updated this revision to Diff 91384.Mar 10 2017, 11:30 AM

Put the test in the correct directory.

kcc added inline comments.Mar 10 2017, 5:26 PM
test/asan/TestCases/Posix/asan-sigbus.cpp
4 ↗(On Diff #91384)

don't compile twice.
what's handle_bug?

filcab updated this revision to Diff 91470.Mar 11 2017, 7:08 AM
filcab marked an inline comment as done.

Updating and fixing test

In D30783#697231, @kcc wrote:

what are those platforms and can we have at the very least tests for those platforms?
(Also, would be nice to have tests for linux/mac, but frankly I don't remember how to cause a SIGBUS on linux)

Hi Kostya,

The PS4 needs to handle those signals differently. As of right now, we can't upload the modifications to make ASan work on it, though. I doubt it would be useful to upstream a test with REQUIRES: ps4, though.

test/asan/TestCases/Posix/asan-sigbus.cpp
4 ↗(On Diff #91384)

A bug in the command line. Updating.

kcc accepted this revision.Mar 13 2017, 11:14 AM

LGTM
Please watch the bots, the change is a bit risky

This revision is now accepted and ready to land.Mar 13 2017, 11:14 AM
This revision was automatically updated to reflect the committed changes.