Valgrind is not compatible with macOS 12 now, and I tried to add compile flag -fsanitize=address, but got link error:
Undefined symbols for architecture x86_64:
"___asan_init", referenced from:
_asan.module_ctor in main.cpp.o
"___asan_version_mismatch_check_apple_clang_1300", referenced from:
_asan.module_ctor in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Is there any way to make Valgrind compatible with macOS 12?