Page MenuHomePhabricator

[MSan] Apply the ctor creation scheme of TSan
ClosedPublic

Authored by philip.pfaffe on Jan 15 2019, 10:56 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

philip.pfaffe created this revision.Jan 15 2019, 10:56 AM
chandlerc accepted this revision.Jan 15 2019, 7:11 PM

LGTM with some minor cleanups!

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
925 ↗(On Diff #181823)

Add a comment at the start of the lambda to remind the reader that this is used when we are the first to try and get the sanitizer ctor/init function to set it up?

931 ↗(On Diff #181823)

Strange vertical whitespace here...

932–934 ↗(On Diff #181823)

Instead of this pattern, I'd suggest early exit:

if (!ClWithComdat) {
  appendToGlobalCtors(M, cTor, 0);
  return;
}
...
This revision is now accepted and ready to land.Jan 15 2019, 7:11 PM
philip.pfaffe marked 3 inline comments as done.

Address comments and update two missing testcases.

Closed by commit rL351322: [MSan] Apply the ctor creation scheme of TSan (authored by pfaffe, committed by ). · Explain WhyJan 16 2019, 3:19 AM
This revision was automatically updated to reflect the committed changes.