This is an archive of the discontinued LLVM Phabricator instance.

sanitizer_common: fix and re-enable signal_segv_handler test
ClosedPublic

Authored by dvyukov on Jun 29 2015, 7:05 AM.

Details

Reviewers
eugenis
Summary

struct sigaction was not initialized. As the result if SA_RESETHAND is set in sa_flags, then the handler is reset after first invocation leading to crash.
Initialize struct sigaction to zero.
Ironically, the test was run under msan all the time.

Diff Detail

Event Timeline

dvyukov updated this revision to Diff 28668.Jun 29 2015, 7:05 AM
dvyukov retitled this revision from to sanitizer_common: fix and re-enable signal_segv_handler test.
dvyukov updated this object.
dvyukov edited the test plan for this revision. (Show Details)
dvyukov added a reviewer: eugenis.
dvyukov added a subscriber: Unknown Object (MLST).
dvyukov updated this revision to Diff 28669.Jun 29 2015, 7:07 AM
dvyukov updated this object.
eugenis accepted this revision.Jun 29 2015, 9:28 AM
eugenis edited edge metadata.

LGTM
Thanks!

This revision is now accepted and ready to land.Jun 29 2015, 9:28 AM

Please add msan interceptor for sigaction.

Submitted in 240965.

Just saw this test crash (SEGV) at r240965 (i.e. with this patch) in ninja check-all, but could not reproduce in an individual run.