Mac OS X Sierra 10.13
I do as wrote here https://clang.llvm.org/docs/LeakSanitizer.html
I.e. created the small application with memory leak
#include <stdlib.h>
void *p;
int main() {
p = malloc(7);
p = 0; // The memory is leaked here.
return 0;
}
Then build it and run to test how the memory leak is detected:
admins-Mac:test2 admin$ clang -fsanitize=address -g mleak.c ; ASAN_OPTIONS=detect_leaks=1 ./a.out
==556==AddressSanitizer: detect_leaks is not supported on this platform.
Abort trap: 6
admins-Mac:test2 admin$
How I can detect the leak? I need to use it for my large application.