This is an archive of the discontinued LLVM Phabricator instance.

[LSan] Fix tests with some libstdc++ implementations.
ClosedPublic

Authored by samsonov on Nov 18 2015, 5:36 PM.

Details

Summary

Newer libstdc++ has global pool, which is filled with objects
allocated during libstdc++ initialization, and never released.
Using use_globals=0 in the lit tests results in these objects
being treated as leaks.

Fix this by porting several tests to plain C, and introducing
a simple sanity test case for __lsan::ScopedDisabler.

Diff Detail

Repository
rL LLVM

Event Timeline

samsonov updated this revision to Diff 40583.Nov 18 2015, 5:36 PM
samsonov retitled this revision from to [LSan] Fix tests with some libstdc++ implementations..
samsonov updated this object.
samsonov added reviewers: kcc, ygribov.
samsonov added a subscriber: llvm-commits.
kcc accepted this revision.Nov 18 2015, 5:39 PM
kcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 18 2015, 5:39 PM

Yuri, could you check if these tests pass on your platform now?

ygribov accepted this revision.Nov 19 2015, 3:28 AM
ygribov edited edge metadata.

Yes, this worked on my machine.

This revision was automatically updated to reflect the committed changes.
compiler-rt/trunk/test/lsan/TestCases/disabler_in_tsd_destructor.cc