What should I fix when Address Sanitizer says detect_leaks is not supported on this platform?
问题 I'm using Clang to compile my project, on x86_64 OS X(MacOS 10.15.5 Catalina). I want to identify exactly from which file, which function, which line causes memory leaks. I am trying to use Address Sanitizer, specifically Leak Sanitizer. Here are flags that I'm using when compiling: -Wall -Wextra -flto -O3 -march=native -ffast-math -fsanitize=address It successfully compiles. However, when I try to use run-time flag ASAN_OPTIONS=detect_leaks=1 in order to enable Leak Sanitizer, I see the