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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu.org

--- Comment #15 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #14)

> https://github.com/torvalds/linux/blob/master/arch/arm64/include/asm/memory.h
> https://github.com/torvalds/linux/blob/master/arch/arm64/Kconfig
> reveals that aarch64 can be on Linux configured to support 39, 42 or 48 bits
> virtual address space.  The current libsanitizer/asan/ and
> gcc/config/aarch64/aarch64.c (aarch64_asan_shadow_offset) seems to be okay
> only for the 39 bits virtual address space, while Fedora/RHEL apparently use
> 42 bits VA.  Wonder if aarch64 couldn't use a layout closer to what x86_64
> uses for asan, with shadow offset low 0x7fff8000, which is flexible to
> different sizes of the virtual address space.

Right selecting 64k pages causes this.  Asan is known to be broken with the
different virtual address space due page size differences.  PowerPC has a
similar issue IIRC.  x86_64 does not have this issue as there is only one page
size and not different virtual address spaces there.

I think ASAN for AARCH64 needs testing on multiple virtual address sizes before
it can be turned on by default.  Note most distros uses 64k pages (Fedora for
an example) but some don't MontaVista CG7 for X-gene does not due to needing to
allow ARMv7 programs to run.

Reply via email to