This is an archive of the discontinued LLVM Phabricator instance.

tsan: Add a missing disable_sanitizer_instrumentation attribute
ClosedPublic

Authored by glider on Feb 17 2022, 6:17 AM.

Details

Summary

Turns out the test was working by accident: we need to ensure
TSan instrumentation is not called from the fork() hook, otherwise the
tool will deadlock. Previously it worked because alloc_free_blocks() got
inlined into __tsan_test_only_on_fork(), but it cannot always be the
case.

Adding attribute((disable_sanitizer_instrumentation)) will prevent
TSan from instrumenting alloc_free_blocks().

Diff Detail

Event Timeline

glider requested review of this revision.Feb 17 2022, 6:17 AM
glider created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2022, 6:17 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
dvyukov accepted this revision.Feb 17 2022, 6:25 AM
This revision is now accepted and ready to land.Feb 17 2022, 6:25 AM
This revision was landed with ongoing or failed builds.Feb 17 2022, 6:34 AM
This revision was automatically updated to reflect the committed changes.