Clang 8 with MinGW-w64: How do I use address- & UB sanitizers?
问题 Clang 8 release notes have this promising line: Allow using Address Sanitizer and Undefined Behaviour Sanitizer on MinGW. However, I unable to figure out how to use those properly. I'm using Clang 8.0.0 with MSYS2 MinGW GCC. Exact details are at the bottom of the question. I'm trying to compile following minimal piece of code: 1.cpp #include <iostream> int main() { // Testing ubsan int x = 0x7fffffff; x++; std::cout << x << std::endl; // Testing asan int *y = new int; delete y; std::cout <<