[llvm-dev] Using ASAN on C code called from other languages

Erik de Castro Lopo via llvm-dev llvm-dev at lists.llvm.org
Sun Feb 5 23:35:57 PST 2017


Hi all,

I have haskell code that calls into C code and i'd like to compile the C
code with ASAN. I've managed to convince the build system to compile the
C code with '-fsanitize=address -g' (so that if I get a link errors of
the ASAN library isn't linked) and then also managed to link libasan,
but when my trivial test program with an obvious out-of-bounds access
run, I don't get the ASAN error I was expecting.

Is there some ASAN initialisation step that isn't happening?

Any clues appreciated.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the llvm-dev mailing list