[RISC-V] Add support for AddressSanitizer on RISC-V GCC
Tue Aug 25 19:39:11 GMT 2020
On Wed, Aug 19, 2020 at 1:02 AM Joshua via Gcc-patches
> * config/riscv/riscv.c (asan_shadow_offset): Implement the offset of asan shadow memory for risc-v.
> (asan_shadow_offset): new macro definition.
When I try the patch, I get asan errors complaining about memory mappings.
==9422==Shadow memory range interleaves with an existing memory
mapping. ASan cannot proceed correctly. ABORTING.
==9422==ASan shadow was supposed to be located in the
I haven't gotten it working yet, but I haven't tried debugging it yet
either. How exactly are you testing it? It fails for me using a 4.15
kernel on hardware, and on a user mode qemu. I haven't tried booting
a 5.x kernel in qemu, that would take some time to set up. Likewise
using a 5.x kernel on hardware would take some time to set up.
More information about the Gcc-patches