Looks great.
(I am not an expert in the build system either, but the changes look trivial).

Thanks!

--kcc

On Fri, Nov 23, 2012 at 8:29 PM, Alexander Potapenko <gli...@google.com> wrote:
> The mach_override path looks good to me. I don't have enough knowledge
> of GCC buildsystem yet to review the rest.
>
> On Fri, Nov 23, 2012 at 8:17 PM, Jack Howarth <howa...@bromo.med.uc.edu> 
> wrote:
>>    The attached patch imports the missing mach_override/mach_override.h and
>> mach_override/mach_override.c files from llvm.org's compiler-rt at
>>
>> r168032 | glider | 2012-11-15 03:32:16 -0500 (Thu, 15 Nov 2012) | 3 lines
>>
>> [ASan] Add the "lea $imm(%rip),%rax" instruction to mach_override.c
>> The need for this has been reported by Jack Howarth 
>> (howa...@bromo.med.uc.edu) who's porting ASan-Darwin to GCC
>>
>> The patch adds darwin to the supported target list in configure.tgt and
>> defines USING_MACH_OVERRIDE for darwin in configure.ac. The definition of
>> USING_MACH_OVERRIDE is used in Makefile.am as the test for appending
>> mach_override/mach_override.c to libinterception_la_SOURCES. 
>> LINK_COMMAND_SPEC_A
>> in gcc/config/darwin.h is modified to add an entry to handle 
>> fsanitize=address
>> so that the required linkages are used for libasan. The static linkage of 
>> libasan.a
>> in LINK_COMMAND_SPEC_A is handle separately for -static-libstdc++ (which 
>> requires
>> libstdc++.a) and the -static, -static-gcc and -static-gfortran cases. Tested 
>> at rr193756
>> on x86_64-apple-darwin12 for both -m32 and -m64 with the both 
>> use-after-free.c testcase
>> and...
>>
>>  make -k check RUNTESTFLAGS="asan.exp --target_board=unix'{-m32,-m64}'"
>>
>> without regressions.
>>               Jack
>> ps This version adds the requested importation of the LICENSE.txt file from 
>> llvm.org's
>> compiler-rt in interception/mach_override. It also sets TSAN_SUPPORTED=no in 
>> configure.tgt
>> for the 'x86_64-*-darwin* | i?86-*-darwin*' case to avoid building tsan 
>> support.
>
>
>
> --
> Alexander Potapenko
> Software Engineer
> Google Moscow

Reply via email to