This is an archive of the discontinued LLVM Phabricator instance.

[asan][test] XFAIL global-location-nodebug.cpp on Solaris
ClosedPublic

Authored by ro on Jun 24 2022, 5:10 AM.

Details

Summary

A new test FAILs on Solaris:

FAIL: AddressSanitizer-i386-sunos :: TestCases/global-location-nodebug.cpp (465 of 64279)
FAIL: AddressSanitizer-i386-sunos-dynamic :: TestCases/global-location-nodebug.cpp (961 of 64279)

The problem is the unconditional use of -Wl,-S:

ld: fatal: dlopen() of support library (-lstdc++) failed with error: ld.so.1: ld: -lstdc++: open failed: No such file or directory

ld -S has a completely different semantics compared to GNU ld -S/--strip-debug: specify a link-edit support library. To avoid this, I've chosen to XFAIL the test.

Tested on amd64-pc-solaris2.11.

While Solaris ld doesn't support --strip-debug, it has -z strip-class=debug instead, which makes the test PASS. It would be possible to use a substitution (%ld_flags_strip_debug) instead, set in compiler-rt/test/asan/lit.cfg.py. However, this seems like overkill to me.

Diff Detail

Event Timeline

ro created this revision.Jun 24 2022, 5:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2022, 5:10 AM
ro requested review of this revision.Jun 24 2022, 5:10 AM
Herald added a subscriber: Restricted Project. · View Herald TranscriptJun 24 2022, 5:10 AM

The other option is to use llvm-strip, but this doesn't naively work with the Android builds.

I think this is fine for now.

hctim accepted this revision.Jun 24 2022, 10:46 AM
This revision is now accepted and ready to land.Jun 24 2022, 10:46 AM
This revision was landed with ongoing or failed builds.Jun 25 2022, 1:41 AM
This revision was automatically updated to reflect the committed changes.