You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, we're trying to cross compile some RISCV code and run it in qemu-user. For testing, it is helpful to have address sanitizer enabled. We used the following:
AddressSanitizer:DEADLYSIGNAL
=================================================================
==2608716==ERROR: AddressSanitizer: SEGV on unknown address 0x0015556500f8 (pc 0x0040008d0938 bp 0x0040008007b0 sp 0x0040007fff60 T-1)
==2608716==The signal is caused by a READ memory access.
AddressSanitizer: CHECK failed: asan_suppressions.cpp:47 "((suppression_ctx)) != (0)" (0x0, 0x0) (tid=2608716)
AddressSanitizer: CHECK failed: asan_suppressions.cpp:47 "((suppression_ctx)) != (0)" (0x0, 0x0) (tid=2608716)
Trace/breakpoint trap
Unfortunately, it's been hard to debug this from time constraints. My first thought is to find out whether or not this is something caused by a misconfiguration or an upstream issue where ASan straight up doesn't support running in qemu-user on RISCV.
For what it's worth, I also built a different toolchain with ./configure --prefix=$RV64PREFIX --enable-llvm --enable-linux --enable-libsanitizer, which from my understanding builds for rv64gc/lp64d. Compiling with ASan in both Clang and GCC in this configuration yields the same error as above.
As a stopgap, we've built Valgrind for RISCV, but even that's from my understanding still a WIP and there have been some bugs.
Either way, any pointers in the right direction would be appreciated.
The text was updated successfully, but these errors were encountered:
Hello, we're trying to cross compile some RISCV code and run it in qemu-user. For testing, it is helpful to have address sanitizer enabled. We used the following:
./configure --prefix=$RV64PREFIX --with-arch=rv64gc --with-abi=lp64 --enable-libsanitizer
Here's a test C program which ASan should say has a memory leak:
Now, we compile test.c and run as follows:
Which is then met with the following:
Unfortunately, it's been hard to debug this from time constraints. My first thought is to find out whether or not this is something caused by a misconfiguration or an upstream issue where ASan straight up doesn't support running in qemu-user on RISCV.
For what it's worth, I also built a different toolchain with
./configure --prefix=$RV64PREFIX --enable-llvm --enable-linux --enable-libsanitizer
, which from my understanding builds forrv64gc/lp64d
. Compiling with ASan in both Clang and GCC in this configuration yields the same error as above.As a stopgap, we've built Valgrind for RISCV, but even that's from my understanding still a WIP and there have been some bugs.
Either way, any pointers in the right direction would be appreciated.
The text was updated successfully, but these errors were encountered: