Hi bearophile!
On Sunday, 2 February 2014 at 13:46:50 UTC, bearophile wrote:
Slide 21, Integrating AdressSanitizer:
I have tried to compile this code (adapted from this page:
http://clang.llvm.org/docs/AddressSanitizer.html ):
int main(string[] args) {
auto array = (new int[100]).ptr;
delete array;
return array[args.length];
}
It gives me:
...>ldmd2 -release -noboundscheck -sanitize=address -run test.d
.../mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/ld.exe:
cannot find -lasan
collect2.exe: error: ld returned 1 exit status
Error: C:\MinGW\bin\gcc.exe failed with status: 1
You need to install compiler-rt. It includes the asan libraray.
Regards,
Kai