This is an archive of the discontinued LLVM Phabricator instance.

[LSan] Make parent tool responsible for initializing LSan flags.
ClosedPublic

Authored by samsonov on Feb 11 2015, 6:39 PM.

Details

Summary

LSan can be combined with a parent tool (for now it's only ASan).
Also, we allow LSAN_OPTIONS to override certain common flags. It means
we have to parse LSAN_OPTIONS early enough, before the rest of the
parent tool (including chunks of sanitizer_common) is initialized.

In future, we can use the same approach for UBSan, after we embed it
into ASan runtime in a similar way.

Diff Detail

Repository
rL LLVM

Event Timeline

samsonov updated this revision to Diff 19801.Feb 11 2015, 6:39 PM
samsonov retitled this revision from to [LSan] Make parent tool responsible for initializing LSan flags..
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added reviewers: earthdok, eugenis.
samsonov added a subscriber: Unknown Object (MLST).
eugenis accepted this revision.Feb 16 2015, 1:03 AM
eugenis edited edge metadata.

Looks like a step in the right direction.

lib/lsan/lsan.cc
42 ↗(On Diff #19801)

What does this yellow bar to the left mean? Tab characters?

This revision is now accepted and ready to land.Feb 16 2015, 1:03 AM
samsonov added inline comments.Feb 16 2015, 2:08 PM
lib/lsan/lsan.cc
42 ↗(On Diff #19801)

It means that the code was copied from a different place.

This revision was automatically updated to reflect the committed changes.