[compiler-rt] r235944 - [asan] Fix ASan build on Android/AArch64.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Mon Apr 27 17:54:58 PDT 2015
On Mon, Apr 27, 2015 at 5:27 PM, Alexey Samsonov <vonosmas at gmail.com> wrote:
>
> On Mon, Apr 27, 2015 at 4:49 PM, Evgeniy Stepanov
> <eugeni.stepanov at gmail.com> wrote:
>>
>> Author: eugenis
>> Date: Mon Apr 27 18:49:39 2015
>> New Revision: 235944
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=235944&view=rev
>> Log:
>> [asan] Fix ASan build on Android/AArch64.
>>
>> The build for aarch64 is not enabled in cmake/config-ix.cmake yet.
>>
>> Modified:
>> compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
>>
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
>>
>> Modified: compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt?rev=235944&r1=235943&r2=235944&view=diff
>>
>> ==============================================================================
>> --- compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt (original)
>> +++ compiler-rt/trunk/lib/sanitizer_common/CMakeLists.txt Mon Apr 27
>> 18:49:39 2015
>> @@ -119,7 +119,7 @@ append_have_file_definition(tirpc/rpc/xd
>> set(SANITIZER_CFLAGS ${SANITIZER_COMMON_CFLAGS})
>> append_no_rtti_flag(SANITIZER_CFLAGS)
>>
>> -append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=512
>> +append_list_if(SANITIZER_LIMIT_FRAME_SIZE -Wframe-larger-than=570
>
>
> ^^
> Maybe, we can improve the problematic function?
I'm not sure it's the function's fault - last time I looked there was
a lot of spilled registers, maybe excessive inlining.
We could do some tuning, but then 512 is an just arbitrary number.
>
>>
>> SANITIZER_CFLAGS)
>> append_list_if(COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG
>> -Wglobal-constructors
>> SANITIZER_CFLAGS)
>>
>> Modified:
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h?rev=235944&r1=235943&r2=235944&view=diff
>>
>> ==============================================================================
>> ---
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
>> (original)
>> +++
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h Mon
>> Apr 27 18:49:39 2015
>> @@ -321,7 +321,7 @@ namespace __sanitizer {
>> long pw_change;
>> char *pw_class;
>> #endif
>> -#if !SANITIZER_ANDROID
>> +#if !(SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 32))
>> char *pw_gecos;
>> #endif
>> char *pw_dir;
>> @@ -383,7 +383,7 @@ namespace __sanitizer {
>> };
>> #endif
>>
>> -#if SANITIZER_ANDROID || SANITIZER_MAC || SANITIZER_FREEBSD
>> +#if SANITIZER_MAC || SANITIZER_FREEBSD
>> struct __sanitizer_msghdr {
>> void *msg_name;
>> unsigned msg_namelen;
>> @@ -520,6 +520,27 @@ namespace __sanitizer {
>> #endif
>>
>> // Linux system headers define the 'sa_handler' and 'sa_sigaction'
>> macros.
>> +#if SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 64)
>> + struct __sanitizer_sigaction {
>> + unsigned sa_flags;
>> + union {
>> + void (*sigaction)(int sig, void *siginfo, void *uctx);
>> + void (*handler)(int sig);
>> + };
>> + __sanitizer_sigset_t sa_mask;
>> + void (*sa_restorer)();
>> + };
>> +#elif SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 32)
>> + struct __sanitizer_sigaction {
>> + union {
>> + void (*sigaction)(int sig, void *siginfo, void *uctx);
>> + void (*handler)(int sig);
>> + };
>> + __sanitizer_sigset_t sa_mask;
>> + uptr sa_flags;
>> + void (*sa_restorer)();
>> + };
>> +#else // !SANITIZER_ANDROID
>> struct __sanitizer_sigaction {
>> #if defined(__mips__) && !SANITIZER_FREEBSD
>> unsigned int sa_flags;
>> @@ -544,6 +565,7 @@ namespace __sanitizer {
>> int sa_resv[1];
>> #endif
>> };
>> +#endif // !SANITIZER_ANDROID
>>
>> #if SANITIZER_FREEBSD
>> typedef __sanitizer_sigset_t __sanitizer_kernel_sigset_t;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
>
> --
> Alexey Samsonov
> vonosmas at gmail.com
More information about the llvm-commits
mailing list