This is an archive of the discontinued LLVM Phabricator instance.

[TSan] Remove ignore_interceptors_accesses flag
ClosedPublic

Authored by yln on Nov 29 2018, 1:19 PM.

Details

Summary

It has been superseded by the ignore_noninstrumented_modules flag and is no longer needed.

Also simplify a test that checks that mmap_interceptor respects ignore annotations (thr->ignore_reads_and_writes ).
Relevant: https://reviews.llvm.org/rL269855

rdar://problem/46263073 Remove obsolete Apple-specific suppression option

Diff Detail

Event Timeline

yln created this revision.Nov 29 2018, 1:19 PM
dvyukov accepted this revision.Nov 29 2018, 1:24 PM
This revision is now accepted and ready to land.Nov 29 2018, 1:24 PM
yln updated this revision to Diff 175978.Nov 29 2018, 3:29 PM

Use std::atomic to make test cleaner

dvyukov added inline comments.Dec 20 2018, 10:20 PM
compiler-rt/test/tsan/ignored-interceptors-mmap.cc
53 ↗(On Diff #175978)

Are asserts even enabled in all builds? I would just use if.

yln marked 2 inline comments as done.Dec 21 2018, 3:40 PM
yln added inline comments.
compiler-rt/test/tsan/ignored-interceptors-mmap.cc
53 ↗(On Diff #175978)

This is not a test assert/check but rather an assert to ensure the sanity of the test itself.
The actual test checks are below (the FileCheck directives). Note both expect "OK", i.e., the program completes and not aborted via the assert. So I am not too sure would you would put into the if?
Let me know if you have an idea how to better express my intent here.

dvyukov accepted this revision.Dec 21 2018, 11:44 PM
dvyukov added inline comments.
compiler-rt/test/tsan/ignored-interceptors-mmap.cc
53 ↗(On Diff #175978)

OK, I see assert is used in other tests. So let's leave it.
There is usually no difference between thing-under-test failing, or the test itself failing -- in both cases the test needs to fail and a human needs to take a look. A filecheck failure can indicate both as well for most of our tests.

yln edited the summary of this revision. (Show Details)Jan 10 2019, 11:58 AM
yln updated this revision to Diff 181123.Jan 10 2019, 12:01 PM
yln marked 2 inline comments as done.

No change in functionality

This revision was automatically updated to reflect the committed changes.
lib/tsan/rtl/tsan_interceptors.cc