[cfe-dev] Using the AddressSanitizer under Windows

Gaier, Bjoern via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 23 23:13:29 PST 2019


Hello everyone,

I heard a lot of good things about clangs "Sanitizer" so I wanted to test the "AddressSanitizer" with clang-cl. I complied LLVM7, Clang and Compiler-rt on my machine, wrote a simple test application and passed "-Xclang -fsanitize=address" to clang-cl. The linker then complained about undefined references. Because I'm on a Windows7 x64 machine I then linked "clang_rt.asan-x86_64.lib" to my project.

When I now execute my test application I get the messages:
==8160==AddressSanitizer CHECK failed: \compiler-rt-7.0.0.src\lib\sanitizer_common\sanitizer_common_interceptors.inc:7265 "((__interception::real_memcpy)) != (0)" (0x0, 0x0)
==8004==AddressSanitizer CHECK failed: \compiler-rt-7.0.0.src\lib\asan\asan_poisoning.cc:37 "((AddrIsInMem(addr))) != (0)" (0x0, 0x0)

What am I doing wrong?

Kind greetings
Björn
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190124/52d9792d/attachment.html>


More information about the cfe-dev mailing list