The new suppression type is called "race_top" and is matched only against top frame in report stacks.
This is required for situations when we want to suppress a race in a "thread pool" or "event loop" implementation.
If we simply use "race:ThreadPool::Execute" suppression, that can suppress everything in the program.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
General question: you're creating a TSan-specific suppression type that matches the topmost frame.
Don't you think other tools may require such functionality as well?
lib/tsan/rtl/tsan_suppressions.cc | ||
---|---|---|
118–119 | you can totally factor this out to bool IsSuppressed(const AddressInfo &info, const char *suppression_type, Suppression **sp); | |
124 | stack->frames != nullptr | |
test/tsan/race_top_suppression.cc.supp | ||
1 ↗ | (On Diff #28334) | I'd prefer to get rid of extra file, and create it with "echo" command in the RUN-line. |
test/tsan/race_top_suppression1.cc.supp | ||
1 ↗ | (On Diff #28334) | Ditto |
Comment Actions
Alexey, wdyt about this functionality in general? Shall we limit it to TSan?
sent from phone
Comment Actions
I see no reasonable way to make this non-limited to TSan, given how generic our suppression machinery is.
lib/tsan/rtl/tsan_suppressions.cc | ||
---|---|---|
98 | done |
make this function static?