-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
OS: Windows 10 x64, version 1703 (build 15063.726)
Steps to reproduce:
- Install MSYS2, default values
- Update MSYS2,
pacman -Syyu
, use ctrl+C to close pacman then close window - Update MSYS2 again,
pacman -Syyu
- Install GCC and nano,
pacman -Sy mingw-w64-x86_64-gcc nano
- Open a MinGW 64bit session from the Start menu
- Open nano to create a new .cpp file,
nano test.cpp
- Paste following code into nano,
int main(int argc, char **argv) {
int *array = new int[100];
array[0] = 0;
int res = array[argc + 100]; // BOOM
delete [] array;
return res;
}
- Try to compile,
g++ -fsanitize=address -O1 test.cpp -o test
Output:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lasan
collect2.exe: error: ld returned 1 exit status
So, is AddressSanitizer available within the MinGW-w64 project?
Mart-Bogdan, askondro, autoantwort, zhb2000, charles-esterbrook and 18 moreChallanger524
Metadata
Metadata
Assignees
Labels
No labels