This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][asan][test] Set LD_LIBRARY_PATH_{32,64} on Solaris
ClosedPublic

Authored by ro on Aug 21 2020, 12:48 AM.

Details

Summary

The dynamically linked ASan tests rely on LD_LIBRARY_PATH to find libclang_rt.asan-*.so at runtime.

However, the Solaris runtime linker ld.so.1 also supports more specific variables: LD_LIBRARY_PATH_32 and LD_LIBRARY_PATH_64 respectively. If those happen to be set, LD_LIBRARY_PATH is ignored. In such a case, all dynamically linked ASan tests FAIL. For i386 alone, this affects about 200 tests.

The following patch fixes that by also setting LD_LIBRARY_PATH_{32,64} on Solaris.

Tested on amd64-pc-solaris2.11 both with only LD_LIBRARY_PATH set and with LD_LIBRARY_PATH_{32,64} set too.

Diff Detail

Event Timeline

ro created this revision.Aug 21 2020, 12:48 AM
Herald added subscribers: Restricted Project, fedor.sergeev, dberris. · View Herald TranscriptAug 21 2020, 12:48 AM
ro requested review of this revision.Aug 21 2020, 12:48 AM
vitalybuka accepted this revision.Aug 24 2020, 7:05 PM

LGTM if it works. I don't have SunOS to test.

This revision is now accepted and ready to land.Aug 24 2020, 7:05 PM
ro added a comment.Aug 25 2020, 12:33 AM

LGTM if it works. I don't have SunOS to test.

Thanks. I meant to provide Solaris 11.4/sparcv9 and amd64 systems for the GCC compile farm, but that proved difficult for legal reasons. There is a Solaris 11.3/sparcv9 system there (gcc211), but llvm master doesn't currently even build on 11.3 due to a couple of issues (libc, ld.so.1, ld) and it's uncertain if it can be beaten into shape to be somewhat useful.