Open TomesVWhite opened 2 years ago
I tried it in OSx, also can not detect memory leak. Seems only take effect in linux.
I tried it in OSx, also can not detect memory leak. Seems only take effect in linux.
Built-in Clang / LLVM shipped by Xcode does not support Leak Santizer (-fsantize=leak) feature.
@hua-hua-lin Does android 13/ latest Clang supports Leak sanitizer on Android?
@srikanth007m Maybe you can try it on the NDK25 version
@hua-hua-lin If i want to enable Lsan globally. What flag should i need to use in Android build system?
@hua-hua-lin If i want to enable Lsan globally. What flag should i need to use in Android build system?
add ASAN_OPTIONS=detect_leaks=1, When you run the executable file.
./a.out ASAN_OPTIONS=detect_leaks=1
ASAN still not support mem-leak-detect on Android-14 with ndk-r25 ...
I have integrated asan in the project, packaged it into apk, installed it on the mobile phone, other memory errors can be detected, only the memory leak in the sample cannot be detected. The same memory leak code, compiled into a.out, can capture the leak normally when running on the linux platform.