[Bug sanitizer/65662] AddressSanitizer CHECK failed: ../../../../gcc/libsanitizer/sanitizer_common/sanitizer_allocator.h:835 "((res)) < ((kNumPossibleRegions))" (0x3ffb49, 0x80000)
vekumar at gcc dot gnu.org
Mon Apr 6 04:44:00 GMT 2015
--- Comment #8 from vekumar at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #7)
> (In reply to vekumar from comment #6)
> > For 42 bit VA, I have to change the SANITIZER_MMAP_RANGE_SIZE to 1 <<42.
> > Also compiler has to add the shadow offset instead of Oring it.
> You don't, see my patch.
> As I said, the hard part is making sure all 3 layouts work with the same
> libasan library - the problem is that the library assumes some decisions
> (like whether to use 32-bit or 64-bit allocator) have to be done at library
> compile time, when for aarch64 they really have to be done at runtime.
It was decided to make ASAN work for 42 bit VA without changing the default
allocator (32bit) and the default shadow offset (1<<36).
Please see thread
On 42 bit VA with default settings, I found that some cases (LLVM ASAN tests)
were failing because the compiler (LLVM) does Oring of shadow offset and ASAN
library code adds the shadow offset. Both access resulted in valid memory and
but we were poisoning the wrong shadow memory.
Now your patch turns on the 64 bit allocator. I agree to do this we need to
dynamically detect VA at runtime.
Can you please join the thread and post your comments there.
More information about the Gcc-bugs