This is an archive of the discontinued LLVM Phabricator instance.

Prevent DCE on __lsan_is_turned_off and re-enable test case
ClosedPublic

Authored by fjricci on Sep 8 2017, 11:54 AM.

Details

Summary

-dead_strip in ld64 strips weak interface symbols, which I believe
is most likely the cause of this test failure. Re-enable after marking the interface
function as used.

Diff Detail

Repository
rL LLVM

Event Timeline

fjricci created this revision.Sep 8 2017, 11:54 AM
kcc edited edge metadata.Sep 8 2017, 12:32 PM

May I ask you to also update the comments around the definition of __lsan_is_turned_off in lsan_interface.h?

// To avoid dead stripping you may need to define this function with __attribute__((used))

Good call, thanks.

fjricci updated this revision to Diff 114416.Sep 8 2017, 12:39 PM

Add documentation

kcc accepted this revision.Sep 8 2017, 12:41 PM

LGTM, thanks!

This revision is now accepted and ready to land.Sep 8 2017, 12:41 PM
This revision was automatically updated to reflect the committed changes.