This is an archive of the discontinued LLVM Phabricator instance.

tsan: always setup sigaction signal handler
ClosedPublic

Authored by dvyukov on Jul 30 2021, 10:57 AM.

Details

Summary

Currently we setup either sigaction signal handler with 3 arguments
or old style signal handler with 1 argument depending on user handler type.
This unnecessarily complicates code. Always setup sigaction handler.

Diff Detail

Event Timeline

dvyukov requested review of this revision.Jul 30 2021, 10:57 AM
dvyukov created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptJul 30 2021, 10:57 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
vitalybuka accepted this revision.Jul 30 2021, 11:23 AM
This revision is now accepted and ready to land.Jul 30 2021, 11:23 AM
This revision was automatically updated to reflect the committed changes.
vitalybuka added inline comments.Aug 24 2021, 10:31 AM
compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
1964

@dvyukov
Now it calls .handler as __sanitizer_sigactionhandler_ptr
Is this intentional, some kind of workaround for race mentioned above?

dvyukov marked an inline comment as done.Aug 30 2021, 2:04 AM
dvyukov added inline comments.
compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
1964