This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer_common][test] Disable FastUnwindTest.* on SPARC
ClosedPublic

Authored by ro on Nov 17 2020, 4:49 AM.

Details

Summary

Many of the FastUnwindTest.* tests FAIL on SPARC, both Solaris and Linux. The issue is that the fake stacks used in those tests don't match the requirements of the SPARC unwinder in sanitizer_stacktrace_sparc.cpp which has to look at the register window save area.

I'm disabling the failing tests.

Tested on sparcv9-sun-solaris2.11.

Diff Detail

Event Timeline

ro created this revision.Nov 17 2020, 4:49 AM
Herald added subscribers: Restricted Project, fedor.sergeev, jyknight. · View Herald TranscriptNov 17 2020, 4:49 AM
ro requested review of this revision.Nov 17 2020, 4:49 AM

Thanks a lot Rainer for taking of all of these issues on SPARC!

vitalybuka added inline comments.Nov 17 2020, 2:50 PM
compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cpp
72

BufferedStackTrace::UnwindFast does not work on fake stack? Can that be fixed?

ro added inline comments.Nov 18 2020, 6:38 AM
compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cpp
72

In sanitizer_stacktrace_sparc.cpp you see that SPARC UnwindFast has to peek into the parent frame to get at the window save area. Modelling all this just for the benefit of fake stacks and a couple of testcases seems like total overkill to me.

vitalybuka accepted this revision.Nov 18 2020, 11:15 PM
vitalybuka added inline comments.
compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cpp
71
This revision is now accepted and ready to land.Nov 18 2020, 11:15 PM
ro added inline comments.Nov 20 2020, 2:42 AM
compiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cpp
71

While this would mean touching every single test instead of wrapping the whole block, OTOH it allows to skip just those tests that FAIL much less verbosely than the

#if SANITIZER_CAN_FAST_UNWIND && !defined(__sparc__)

form. I like that.

ro updated this revision to Diff 306636.Nov 20 2020, 2:46 AM
ro edited the summary of this revision. (Show Details)

Only disable actually failing tests using the SKIP_ON_* form.

This revision was landed with ongoing or failed builds.Nov 20 2020, 3:52 AM
This revision was automatically updated to reflect the committed changes.