Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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`.
- Loading branch information