Looks good, but I guess we also need to copy the file LICENSE.TXT --kcc
On Wed, Nov 21, 2012 at 10:44 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 > 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 patch is identical to the prior version (asan_v7.diff) except the > changes to > gcc/config/darwin.h are adjusted for the renaming of the -faddress-sanitizer > option to > -fsanitize=address. >