私が書いたC/C++プログラムでは、バッファオーバーフロー、動的メモリの誤使用などを見つけるために、Valgrind
の代わりにClang
を使用します。私は、hereの指示に従ってClangを構築しました。Windowsで-faddress-sanitizerを使用したClang
私は(指定hereなど)-faddress-消毒オプションで簡単な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の良い(無料の)代用品をしばらく見つけようとしているので、これを使用する可能性に本当に興奮しています。誰かが助けてくれますか?
リンクはもう動作しません。 –
私は今、https:// githubを指すようにリンクを修正しました。com/google/sanitizers/wiki/AddressSanitizerWindowsPort – milianw