On Tue, Nov 06, 2018 at 11:12:00AM +0100, Rainer Orth wrote: > The asan port is 32-bit only for now (on sparc because 64-bit > Solaris/SPARC uses the full address space with a large virtual address > hole in the middle whose exact location is machine-dependent and not > easily determined at runtime; on x86 the situation was the same before > Solaris 11.4).
Doesn't e.g. the initial thread stack live at the end of the address space, so that you could compute from that the size of the virtual address space and from there determine the size of the hole? Or poke the hole with mmap calls or something similar? Parse some special filesystem files? libasan can cope with dynamically determined layouts in some cases, on some arches it supports varying virtual address space sizes (though with a fixed shadow offset). > 2018-10-31 Rainer Orth <r...@cebitec.uni-bielefeld.de> > > gcc: > PR sanitizer/80953 > * config/sol2.h (ASAN_CC1_SPEC): Define. > (LD_WHOLE_ARCHIVE_OPTION): Define. > (LD_NO_WHOLE_ARCHIVE_OPTION): Define. > (ASAN_REJECT_SPEC): Provide default. > (LIBASAN_EARLY_SPEC): Define. > (LIBTSAN_EARLY_SPEC): Define. > (LIBLSAN_EARLY_SPEC): Define. > * config/i386/sol2.h (CC1_SPEC): Redefine. > (ASAN_REJECT_SPEC): Define. > > * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare. > (TARGET_ASAN_SHADOW_OFFSET): Define. > (sparc_asan_shadow_offset): New function. > * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC. > (ASAN_REJECT_SPEC): Define. > > gcc/testsuite: > PR sanitizer/80953 > * c-c++-common/asan/alloca_loop_unpoisoning.c: Require alloca > support. > (foo): Use __builtin_alloca. > > libsanitizer: > PR sanitizer/80953 > * configure.tgt (sparc*-*-solaris2.11*): Enable. > (x86_64-*-solaris2.11* | i?86-*-solaris2.11*): Enable. Ok. Jakub