[compiler-rt] r185150 - [sanitizer] Disable all ptrace-related definitions on Android.

Evgeniy Stepanov eugeni.stepanov at gmail.com
Tue Jul 2 12:08:08 PDT 2013


I think it is simply missing from Android NDK headers, and everyone
brings their own copy.
I wonder if it is the same on PPC64.

On Tue, Jul 2, 2013 at 11:01 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
>> Author: eugenis
>> Date: Fri Jun 28 09:18:10 2013
>> New Revision: 185150
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=185150&view=rev
>> Log:
>> [sanitizer] Disable all ptrace-related definitions on Android.
>
> Is this because user_regs_struct is x86-specific? It does not seem to exist on PPC64/Linux.
>
>  -Hal
>
>>
>> Modified:
>>     compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
>>     compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.h
>>
>> Modified:
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc?rev=185150&r1=185149&r2=185150&view=diff
>> ==============================================================================
>> ---
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
>> (original)
>> +++
>> compiler-rt/trunk/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
>> Fri Jun 28 09:18:10 2013
>> @@ -43,7 +43,6 @@
>>  #include <sys/mount.h>
>>  #include <sys/ptrace.h>
>>  #include <sys/sysinfo.h>
>> -#include <sys/user.h>
>>  #include <sys/vt.h>
>>  #include <linux/cdrom.h>
>>  #include <linux/fd.h>
>> @@ -66,6 +65,7 @@
>>  #include <scsi/scsi.h>
>>  #include <sys/mtio.h>
>>  #include <sys/kd.h>
>> +#include <sys/user.h>
>>  #include <linux/cyclades.h>
>>  #include <linux/if_eql.h>
>>  #include <linux/if_plip.h>
>> @@ -162,7 +162,7 @@ namespace __sanitizer {
>>        return 0;
>>    }
>>
>> -#if SANITIZER_LINUX
>> +#if SANITIZER_LINUX && !SANITIZER_ANDROID
>>    unsigned struct_user_regs_struct_sz = sizeof(struct
>>    user_regs_struct);
>>    unsigned struct_user_fpregs_struct_sz = sizeof(struct
>>    user_fpregs_struct);
>>  #if __WORDSIZE == 64
>>
>> 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=185150&r1=185149&r2=185150&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
>> Fri Jun 28 09:18:10 2013
>> @@ -180,7 +180,7 @@ namespace __sanitizer {
>>      char **h_addr_list;
>>    };
>>
>> -#if SANITIZER_LINUX
>> +#if SANITIZER_LINUX && !SANITIZER_ANDROID
>>    extern unsigned struct_user_regs_struct_sz;
>>    extern unsigned struct_user_fpregs_struct_sz;
>>    extern unsigned struct_user_fpxregs_struct_sz;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory



More information about the llvm-commits mailing list