https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65662

--- 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.
> 
> Sure.
> 
> > 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.

Hi Jakub, 

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
https://groups.google.com/forum/#!topic/address-sanitizer/YzYRJEvVimw.

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.

Reply via email to