This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [test] Skip Expr/nodefaultlib.cpp test if LD_PRELOAD Is used
ClosedPublic

Authored by mgorny on Aug 7 2021, 1:47 PM.

Details

Summary

Some LD_PRELOAD-ed libraries tend to interact badly with --nodefaultlib,
particularly Gentoo sandbox. Do not run this test if LD_PRELOAD is
present in the running environment.

Diff Detail

Event Timeline

mgorny requested review of this revision.Aug 7 2021, 1:47 PM
mgorny created this revision.
This revision is now accepted and ready to land.Aug 9 2021, 11:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2021, 12:35 PM
labath added a comment.Sep 7 2021, 3:45 AM

What does the preloaded library do ? Is it actually necessary for the (other) tests to run? I'm wondering if we shouldn't strip the variable from the environment instead...

mgorny added a comment.Sep 7 2021, 8:26 AM

What does the preloaded library do ? Is it actually necessary for the (other) tests to run? I'm wondering if we shouldn't strip the variable from the environment instead...

It detects accesses to files outside the build tree. Stripping the variable won't help because it will readd itself on fork.