Skip to content

Posix/stack-overflow.cpp etc. FAIL on Linux/sparc64 #109771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rorth opened this issue Sep 24, 2024 · 0 comments
Open

Posix/stack-overflow.cpp etc. FAIL on Linux/sparc64 #109771

rorth opened this issue Sep 24, 2024 · 0 comments
Labels

Comments

@rorth
Copy link
Collaborator

rorth commented Sep 24, 2024

With ASan SPARC testing enabled as per PR #107405, several stack overflow tests FAIL on Linux/sparc64:

  AddressSanitizer-sparc-linux :: TestCases/Linux/stack-overflow-recovery-mode.cpp
  AddressSanitizer-sparc-linux :: TestCases/Linux/stack-overflow-sigbus.cpp
  AddressSanitizer-sparc-linux :: TestCases/Posix/stack-overflow.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Linux/stack-overflow-recovery-mode.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Linux/stack-overflow-sigbus.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Posix/stack-overflow.cpp

Even applying a slightly modified version of PR #109101, the failures aren't fixed. Looking closer, the weird thing is that the faulting address is reported at the very top (or bottom) of the address space, outside of the stack allocation that can be seen with pmap -x.

E.g. for Posix/stack-overflow.cpp, I see

ERROR: AddressSanitizer: SEGV on unknown address 0xfffffff4 (pc 0x70125064 bp 0x00000000 sp 0xff50bf40 T0)

thus this is not treated as a stack overflow. This matches that strace reports:

2447748 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xfffffff4} ---

I don't really know what to make of this. @glaubitz

rorth added a commit to rorth/llvm-project that referenced this issue Sep 24, 2024
When enabling ASan SPARC testing as per PR llvm#107405, 3 stack overflow tests
`FAIL` on Linux/sparc64:
```
  AddressSanitizer-sparc-linux :: TestCases/Linux/stack-overflow-recovery-mode.cpp
  AddressSanitizer-sparc-linux :: TestCases/Linux/stack-overflow-sigbus.cpp
  AddressSanitizer-sparc-linux :: TestCases/Posix/stack-overflow.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Linux/stack-overflow-recovery-mode.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Linux/stack-overflow-sigbus.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Posix/stack-overflow.cpp
```
However, as detailed in Issue llvm#109771, even a Linux equivalent of the
Solaris/sparcv9 fix (PR llvm#109101) doesn't improve the situation.

Therefore this patch `XFAIL`s the tests until the root cause can be figured
out.

Tested on `sparc64-unknown-linux-gnu`, `sparcv9-sun-solaris2.11`, and
`x86_64-pc-linux-gnu`.
rorth added a commit that referenced this issue Sep 25, 2024
When enabling ASan SPARC testing as per PR #107405, 3 stack overflow
tests `FAIL` on Linux/sparc64:
```
  AddressSanitizer-sparc-linux :: TestCases/Linux/stack-overflow-recovery-mode.cpp
  AddressSanitizer-sparc-linux :: TestCases/Linux/stack-overflow-sigbus.cpp
  AddressSanitizer-sparc-linux :: TestCases/Posix/stack-overflow.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Linux/stack-overflow-recovery-mode.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Linux/stack-overflow-sigbus.cpp
  AddressSanitizer-sparc-linux-dynamic :: TestCases/Posix/stack-overflow.cpp
```
However, as detailed in Issue #109771, even a Linux equivalent of the
Solaris/sparcv9 fix (PR #109101) doesn't improve the situation.

Therefore this patch `XFAIL`s the tests until the root cause can be
figured out.

Tested on `sparc64-unknown-linux-gnu`, `sparcv9-sun-solaris2.11`, and
`x86_64-pc-linux-gnu`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants