Hi I tried using patch suggested on aarch64 machine which is 42 VA.

In addition, I set shadow offset as below in asan_mapping.h
static const u64 kAArch64_ShadowOffset64 = 1ULL << 39;

ASAN builds but when I do make check-asan, I get lot of failures.

 Expected Passes    : 40
 Expected Failures  : 6
 Unsupported Tests  : 129
 Unexpected Failures: 135

The errors are looking like this

Command Output (stderr):
--
==32641==AddressSanitizer: failed to intercept '__isoc99_printf'
==32641==AddressSanitizer: failed to intercept '__isoc99_sprintf'
==32641==AddressSanitizer: failed to intercept '__isoc99_snprintf'
==32641==AddressSanitizer: failed to intercept '__isoc99_fprintf'
==32641==AddressSanitizer: failed to intercept '__isoc99_vprintf'
==32641==AddressSanitizer: failed to intercept '__isoc99_vsprintf'
==32641==AddressSanitizer: failed to intercept '__isoc99_vsnprintf'
==32641==AddressSanitizer: failed to intercept '__isoc99_vfprintf'
==32641==AddressSanitizer: libc interceptors initialized
|| `[0x010000000000, 0x03ffffffffff]` || HighMem    ||
|| `[0x00a000000000, 0x00ffffffffff]` || HighShadow ||
|| `[0x009000000000, 0x009fffffffff]` || ShadowGap  ||
|| `[0x008000000000, 0x008fffffffff]` || LowShadow  ||
|| `[0x000000000000, 0x007fffffffff]` || LowMem     ||
MemToShadow(shadow): 0x009000000000 0x0091ffffffff 0x009400000000 0x009fffffffff
redzone=16
max_redzone=2048
quarantine_size_mb=256M
malloc_context_size=30
SHADOW_SCALE: 3
SHADOW_GRANULARITY: 8
SHADOW_OFFSET: 8000000000
==32641==Installed the sigaction for signal 11
==32641==Installed the sigaction for signal 7
==32641==T0: stack [0x03ffdd280000,0x03ffdda80000) size 0x800000;
local=0x03ffdda75ef0
==32641==AddressSanitizer Init done
ASAN:SIGSEGV
=================================================================
==32641==ERROR: AddressSanitizer: SEGV on unknown address
0x007ffbb4ebc0 (pc 0x0000004c1e1c bp 0x03ffdda75ec0 sp 0x03ffdda75e00
T0)
    #0 0x4c1e1b in main
/home/venkataramanan.kumar/LLVM/TSAN_port/compiler-rt/test/asan/TestCases/Linux/coverage-disabled.cc:18
    #1 0x3ffaa1b0c93 in __libc_start_main (/lib64/libc.so.6+0x20c93)
    #2 0x41b1f3 in _start
(/home/venkataramanan.kumar/LLVM/TSAN_port/Build/projects/compiler-rt/test/asan/AARCH64LinuxConfig/TestCases/Linux/Output/coverage-disabled.cc.tmp+0x41b1f3)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV
/home/venkataramanan.kumar/LLVM/TSAN_port/compiler-rt/test/asan/TestCases/Linux/coverage-disabled.cc:18
main
==32641==ABORTING

No idea what is going wrong? Am I missing something here?

regards,
Venkat,


On 26 January 2015 at 20:50,  <[email protected]> wrote:
>
> Comment #16 on issue 246 by [email protected]: Porting to a new target
> (AArch64)
> https://code.google.com/p/address-sanitizer/issues/detail?id=246
>
> FYI, following patch makes ASAN work fine on 42-bit AS, but will break the
> 39-bit AS and won't fix 48-bit one.  So we really need something more
> dynamic.
>
> --- libsanitizer/asan/asan_allocator.h  (revision 219833)
> +++ libsanitizer/asan/asan_allocator.h  (working copy)
> @@ -100,6 +100,10 @@
>  # if defined(__powerpc64__)
>  const uptr kAllocatorSpace =  0xa0000000000ULL;
>  const uptr kAllocatorSize  =  0x20000000000ULL;  // 2T.
> +# elif defined(__aarch64__)
> +// Valid only for 42-bit VA
> +const uptr kAllocatorSpace =  0x10000000000ULL;
> +const uptr kAllocatorSize  =  0x10000000000ULL;  // 1T.
>  # else
>  const uptr kAllocatorSpace = 0x600000000000ULL;
>  const uptr kAllocatorSize  =  0x40000000000ULL;  // 4T.
> --- libsanitizer/sanitizer_common/sanitizer_platform.h  (revision 219833)
> +++ libsanitizer/sanitizer_common/sanitizer_platform.h  (working copy)
> @@ -79,7 +79,7 @@
>  // For such platforms build this code with
> -DSANITIZER_CAN_USE_ALLOCATOR64=0 or
>  // change the definition of SANITIZER_CAN_USE_ALLOCATOR64 here.
>  #ifndef SANITIZER_CAN_USE_ALLOCATOR64
> -# if defined(__aarch64__) || defined(__mips64)
> +# if defined(__mips64)
>  #  define SANITIZER_CAN_USE_ALLOCATOR64 0
>  # else
>  #  define SANITIZER_CAN_USE_ALLOCATOR64 (SANITIZER_WORDSIZE == 64)
> @@ -88,10 +88,10 @@
>
>  // The range of addresses which can be returned my mmap.
>  // FIXME: this value should be different on different platforms,
> -// e.g. on AArch64 it is most likely (1ULL << 39). Larger values will still
> work
> +// e.g. on AArch64 it is most likely (1ULL << 42). Larger values will still
> work
>  // but will consume more memory for TwoLevelByteMap.
>  #if defined(__aarch64__)
> -# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL <<
> 39)
> +# define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL <<
> 42)
>  #else
>  # define SANITIZER_MMAP_RANGE_SIZE FIRST_32_SECOND_64(1ULL << 32, 1ULL <<
> 47)
>  #endif
>
>
>
> --
> You received this message because this project is configured to send all
> issue notifications to this address.
> You may adjust your notification preferences at:
> https://code.google.com/hosting/settings
>
> --
> You received this message because you are subscribed to the Google Groups
> "address-sanitizer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to