铿锵与Windows上的-faddress-sanitizer

我的意图是使用Clang作为Windows上的Valgrind的替代品,以在我编写的C / C ++程序中查找缓冲区溢出,dynamic内存滥用等。 按照此处提供的说明,我已经成功构build了Clang。

我试图用-faddress-sanitizer选项编译一个简单的C程序(在这里指定),并抛出下面的错误 –

 gcc.exe: error: unrecognized command line option '-faddress-sanitizer' Using built-in specs. COLLECT_GCC=C:/MinGW/bin/gcc.exe Target: mingw32 Configured with: ../gcc-4.7.0/configure --enable-languages=c,c++,ada,fortran,objc,obj- c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --disable-build-poststage1-with-cxx --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw Thread model: win32 gcc version 4.7.0 (GCC) clang: error: assembler (via gcc) command failed with exit code 1 (use -v to see invocation) 

为什么铛(据我所知)调用GCC? 当然,GCC不支持-faddress-sanitizer选项。

我真的很高兴有这种可能性,因为我一直在努力为Valgrind找一个好的(免费的)替代品。 有人可以帮忙吗?

AddressSanitizer最近在Windows上运行得更好(但它仍然有一点工作在进行中)。 在https://github.com/google/sanitizers/wiki/AddressSanitizerWindowsPort上有一些文档

谷歌搜索带我到这个页面 。

去引用,

AddressSanitizer支持

  • Linux x86_64(在Ubuntu 10.04上测试)。
  • MacOS 10.6和10.7(i386 / x86_64)。

对Linux i386 / ARM的支持正在进行中(可能有效,但不能保证)。


关于替换的话题,你看过Dr. Memory吗?