[all-commits] [llvm/llvm-project] 4a264c: [sanitizer_common] Fix GetArgsAndEnv on Linux/spar...
Rainer Orth via All-commits
all-commits at lists.llvm.org
Tue Sep 24 00:37:02 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4a264c559922a8754a0e28fbf316ba667ec19798
https://github.com/llvm/llvm-project/commit/4a264c559922a8754a0e28fbf316ba667ec19798
Author: Rainer Orth <ro at gcc.gnu.org>
Date: 2024-09-24 (Tue, 24 Sep 2024)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Log Message:
-----------
[sanitizer_common] Fix GetArgsAndEnv on Linux/sparc64 (#109109)
When ASan testing is enabled on SPARC as per PR #107405, the
```
AddressSanitizer-sparc-linux :: TestCases/Posix/print_cmdline.cpp
```
test `FAIL`s. Either `ASAN_OPTIONS=print_cmdline=true` yielded binary
garbage in the `Command:` output or just an empty string.
It turns out one needs to apply an offset to `__libc_stack_end` to get
at the actual `argc`/`argv`, as described in `glibc`'s
`sysdeps/sparc/sparc{32,64}/dl-machine.h` (`DL_STACK_END`).
This patch does this, fixing the test.
Tested on `sparc64-unknown-linux-gnu`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list