This is an archive of the discontinued LLVM Phabricator instance.

TSan: Use `createSanitizerCtor` to create ctor, and call `__tsan_init`
ClosedPublic

Authored by ismailp on Apr 1 2015, 9:51 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

ismailp updated this revision to Diff 23071.Apr 1 2015, 9:51 AM
ismailp retitled this revision from to TSan: Use `createSanitizerCtor` to create ctor, and call `__tsan_init`.
ismailp updated this object.
ismailp edited the test plan for this revision. (Show Details)
ismailp added reviewers: kcc, dvyukov.
ismailp added a subscriber: Unknown Object (MLST).
dvyukov added inline comments.Apr 27 2015, 7:01 AM
lib/Transforms/Instrumentation/ThreadSanitizer.cpp
332 ↗(On Diff #23071)

Is this necessary for something? Or merely a precaution?
In either case please add a comment as to why this check is here.

ismailp updated this revision to Diff 24648.Apr 29 2015, 11:01 AM
  • Added comment in ThreadSanitizer::runOnFunction explaining that we don't want to instrument module ctor
  • Added tests that checks __tsan_init is called from module ctor
dvyukov accepted this revision.Apr 29 2015, 11:12 AM
dvyukov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Apr 29 2015, 11:12 AM

Do you commit access? Or I need to land it?

Do you commit access? Or I need to land it?

Thanks! I have commit access, but I can't land this before D8777 is accepted.

This revision was automatically updated to reflect the committed changes.