http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55289
--- Comment #7 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-11-13 14:29:57 UTC --- (In reply to comment #6) > > what you need is to have "-framework CoreFoundation" on the link line - and > > I > > guess the configury &c. needs to arrange this. > > When compiled with -faddress-sanitizer -framework CoreFoundation -lasan, the > executable fails to run with > > dyld: lazy symbol binding failed: Symbol not found: > ___asan_mach_override_ptr_custom > Referenced from: /opt/gcc/gcc4.8w/lib/libasan.0.dylib > Expected in: flat namespace > > dyld: Symbol not found: ___asan_mach_override_ptr_custom > Referenced from: /opt/gcc/gcc4.8w/lib/libasan.0.dylib > Expected in: flat namespace > > Trace/BPT trap This symbol is contained in mach_override.c which we currently don't build in the Makefiles. Note that llvm's cmake files show mach_override.c is compiled with -std=c99. # Custom flags: projects/compiler-rt/lib/interception/CMakeFiles/RTInterception.osx.dir/mach_override/mach_override.c.o_FLAGS = -std=c99 The interception/mach_override/mach_override.c.o object file will need to be linked into both libasan.dylib and libasan.a.