This is an archive of the discontinued LLVM Phabricator instance.

[tsan] Enable ignore_noninstrumented_modules=1 on Darwin by default
ClosedPublic

Authored by kubamracek on Jan 23 2017, 11:15 AM.

Details

Summary

TSan recently got the "ignore_noninstrumented_modules" flag, which disables tracking of read and writes that come from noninstrumented modules (via interceptors). This is a way of suppressing false positives coming from system libraries and other noninstrumented code. This patch turns this on by default on Darwin, where it's supposed to replace the previous solution, "ignore_interceptors_accesses", which disables tracking in *all* interceptors. The new approach should re-enable TSan's ability to find races via interceptors on Darwin.

Diff Detail

Repository
rL LLVM

Event Timeline

kubamracek created this revision.Jan 23 2017, 11:15 AM
dvyukov accepted this revision.Jan 24 2017, 7:12 AM
dvyukov added inline comments.
test/tsan/lit.cfg
30 โ†—(On Diff #85427)

ignore_noninstrumented_modules=0 works because the generic tests use only libc and don't use any darwin-specific libraries, and tsan runtime handles most of the libc functions, right?

This revision is now accepted and ready to land.Jan 24 2017, 7:12 AM
kubamracek added inline comments.Jan 24 2017, 11:06 AM
test/tsan/lit.cfg
30 โ†—(On Diff #85427)

That's correct. Libc doesn't really do any threading stuff unless you explicitly use pthread APIs. Darwin-specific libraries do (XPC, dispatch, NSOperationQueue, ...).

This revision was automatically updated to reflect the committed changes.