[llvm] [RISCV][sanitizer] Fix sanitizer support for different virtual memory layout (PR #66743)

Hau Hsu via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 21:09:11 PDT 2023


hau-hsu wrote:

> Can you reproduce the following? The test `compiler-rt/test/asan/TestCases/strncat-overlap.cpp` passes without this PR but fails with this PR. If not, what does your test environment look like?

Hi @luismarques what's the error message you got for `strncat-overlap.cpp`?

I tried to rebase the patches and run in our QEMU.
I didn't see the `strncat-overlap.cpp` failure, but I got `strncpy-overflow.cpp` failure instead.
It failed because the expected output is like
```
#0 0x2aacb6b128 in strncpy /home/hauh/work/SCT-2830-asan-upstream/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:600:5
```
but after patching the output becomes
```
#0 0x2acde863c6 in $d.27 /home/root/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:600:5
```
The function name `strncpy` becomes a mapping symbol (`$d.27`). It's weird.
I want to know if the `strncat-overlap.cpp` failure is because of the similar issue.
Thanks

https://github.com/llvm/llvm-project/pull/66743


More information about the llvm-commits mailing list