Summary: | WebKit should support building with clang ThreadSanitizer enabled | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> | ||||||||||
Component: | Tools / Tests | Assignee: | David Kilzer (:ddkilzer) <ddkilzer> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | annulen, ap, benjamin, cdumez, cmarcelo, darin, ddkilzer, ews-watchlist, gyuyoung.kim, jbedard, mark.lam, ryuan.choi, saam, sergio, webkit-bug-importer, ysuzuki | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | Other | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 216746 | ||||||||||||
Attachments: |
|
Description
David Kilzer (:ddkilzer)
2020-09-09 10:34:33 PDT
Created attachment 408340 [details]
WIP Patch v1
This is a WIP that implements basic TSan instrumentation for malloc::Mutex and WTF::Lock classes.
It does not provide a way to enable TSan when building yet, though one can enable ASan and change ENABLE_ADDRESS_SANITIZER=YES to ENABLE_THREAD_SANITIZER=YES in Tools/asan/asan.xcconfig for Apple platforms.
Created attachment 408381 [details]
WIP Patch v2
This adds build support with `make TSAN=YES` and `set-webkit-configuration --[no-]tsan`.
It also fixes the build errors from "WIP Patch v1".
Still not complete since we need to instrument more WTF lock classes. (I wonder if we can get away with just instrumenting the WTF::Locker class, too.)
Also, I'm not sure if we should instrument malloc::Mutex or not. We may just end up tossing the bmalloc changes in this patch.
Created attachment 408391 [details]
WIP Patch v3
Fix style issues and make builds.
Created attachment 408656 [details]
Patch v4
Committed r267130: <https://trac.webkit.org/changeset/267130> All reviewed patches have been landed. Closing bug and clearing flags on attachment 408656 [details]. |