This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt][asan][test] Skipt sanitizer_common tests on Sparc
ClosedPublic

Authored by ro on Aug 11 2020, 7:12 AM.

Details

Summary

When building on sparc64-unknown-linux-gnu, I found that a large number of SanitizerCommon-asan-sparc*-Linux tests were FAILing, like

 SanitizerCommon-asan-sparc-Linux :: Linux/aligned_alloc-alignment.cpp
[...]
 SanitizerCommon-asan-sparcv9-Linux :: Linux/aligned_alloc-alignment.cpp
[...]

many of them due to

fatal error: error in backend: Function "_Z14User_OnSIGSEGViP9siginfo_tPv": over-aligned dynamic alloca not supported.

which breaks ASan on Sparc. Currently asan is only built for the benefit of gcc where it does work. However, when enabling the compilation in compiler-rt to make certain it continues to build, I missed compiler-rt/test/sanitizer_common when disabling ASan testing on Sparc (it's not yet enabled on Solaris).

This patch fixes the issue.

Tested on sparcv9-sun-solaris2.11 with the sanitizer_comon testsuite enabled.

Diff Detail

Event Timeline

ro created this revision.Aug 11 2020, 7:12 AM
Herald added subscribers: Restricted Project, fedor.sergeev, mgorny and 2 others. · View Herald TranscriptAug 11 2020, 7:12 AM
ro requested review of this revision.Aug 11 2020, 7:12 AM
vitalybuka accepted this revision.Aug 12 2020, 9:19 PM

I would be nice to have some sparc build bot.

This revision is now accepted and ready to land.Aug 12 2020, 9:19 PM
ro added a comment.Aug 13 2020, 1:31 AM

I would be nice to have some sparc build bot.

As it happens, we do. However, this doesn't help unfortunately since the sanitizer_common testsuite wasn't enable on Solaris.

compiler-rt (like the rest of LLVM` has the unfortunately habit of spreading testsuite configration over far too many places (cmake files, lit config both static and with substitutions), so it's easy to miss one.

When I landed the Solaris ports (both sparc and i386), I completely missed to enable testing sanitizer_common (and ubsan_minimal) on Solaris. The port had been developed in the gcc tree and I was barely familiar with cmake and lit at the time. Even now, it would be way better to have the testsuite enabled everywhere by default and only disable parts that need a particular feature based on that feature rather than static configuration.