Skip to content
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

ASan global-overflow.cpp etc. FAIL on SPARC #108194

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

ASan global-overflow.cpp etc. FAIL on SPARC #108194

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

Comments

@rorth
Copy link
Collaborator

rorth commented Sep 11, 2024

When enabling ASan on SPARC with PR #107405, two tests FAIL in similar ways:

  AddressSanitizer-sparc-sunos :: TestCases/global-overflow.cpp
  AddressSanitizer-sparc-sunos :: TestCases/large_func_test.cpp
  AddressSanitizer-sparc-sunos-dynamic :: TestCases/global-overflow.cpp
  AddressSanitizer-sparc-sunos-dynamic :: TestCases/large_func_test.cpp

For both tests, at -O1 and above one line number in the stacktrace is missing:

    #0 0x00100f1c in main compiler-rt/test/asan/TestCases/global-overflow.cpp

It turns out this happens because .debug_line, which llvm-symbolizer uses to map the address to source file and line, is wrong, as seen with llvm-dwarfdump --debug-line:

0x0000000000100f1c      0      0      0   0             0       0 

while at -O0 things are fine:

    #0 0x00100ed8 in main compiler-rt/test/asan/TestCases/global-overflow.cpp:14:13

0x0000000000100ed8     14     13      0   0             0       0  is_stmt

g++ gets this right OTOH: the test works irrespective of optimization.

rorth added a commit to rorth/llvm-project that referenced this issue Sep 11, 2024
When enabling ASan testing on SPARC as per PR llvm#107405, two tests `FAIL` in
similar ways as detailed in Issue llvm#108194: at `-O1` and above, one line of
the stacktrace lacks the line number info, causing the tests to `FAIL`.  I
could trace this to `clang` generating incomplete line number info; `g++`
gets this right.

To avoid this, this patch `XFAIL`s the affected tests on SPARC.

Tested on `sparcv9-sun-solaris2.11`.
rorth added a commit that referenced this issue Sep 16, 2024
When enabling ASan testing on SPARC as per PR #107405, two tests `FAIL`
in similar ways as detailed in Issue #108194: at `-O1` and above, one
line of the stacktrace lacks the line number info, causing the tests to
`FAIL`. I could trace this to `clang` generating incomplete line number
info; `g++` gets this right.

To avoid this, this patch `XFAIL`s the affected tests on SPARC.

Tested on `sparcv9-sun-solaris2.11`.
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