add LSAN support
Description
Not sure if LeakSanitizer is supported on on pixel with userdebug build android 7.1.2
Environment Details
Platform - OSX 10.12.5 Device - Google Pixel, userdebug build NJH47B android-7.1.2_r17 NDK 15.1.4119039
I was trying to use Address Sanitizer on Anroid, I built the 7.1.2 userdebug version on Pixel.
After run ./asan_device_setup, I was able to catch simple use-after-free, stack-overflow and heap-buffer-overflow. However, ASAN seems cant detect simple memory leaks, is LSAN enabled on Android now.
I'm actually not sure. LSAN is part of ASAN iirc, but idk if that's true for Android. @eugenis or @stephenhines would know.
Not yet, sorry. See https://github.com/google/sanitizers/issues/379
@eugenis Is there any timeline for Leak Sanitizer support in Android?
I'm sure a lot of people are looking forward to this.
@stephenhines: is this on the roadmap for the platform/toolchain?
No, we have no timeline for when LSan will be available in Android.
@stephenhines I have found LSan to be very useful in debugging memory leaks. Is there not enough demand for LSan on Android ?
It just isn't a priority at this time. We don't have the ability to take on every project that could be helpful.
Ok. I understand.
Judging by https://github.com/google/sanitizers/issues/379#issuecomment-907132213 and https://reviews.llvm.org/D85927 LSAN should now be supported on 30/31+?
Is there any update on the NDK side?
This is a feature request, and official support requires additional testing if we are going to advertise it in the NDK. I think that would be the biggest remaining blocker from considering this "Fixed".
android still not support lsan yet? hope for a quick answer~
The quick answers are on this page. The bug is open and it's in the "unplanned" milestone.