ndk icon indicating copy to clipboard operation
ndk copied to clipboard

add LSAN support

Open zhihuawensc opened this issue 8 years ago • 13 comments


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.

zhihuawensc avatar Jun 24 '17 22:06 zhihuawensc

I'm actually not sure. LSAN is part of ASAN iirc, but idk if that's true for Android. @eugenis or @stephenhines would know.

DanAlbert avatar Jun 27 '17 18:06 DanAlbert

Not yet, sorry. See https://github.com/google/sanitizers/issues/379

eugenis avatar Jun 27 '17 22:06 eugenis

@eugenis Is there any timeline for Leak Sanitizer support in Android?

infomaniac777 avatar Nov 26 '18 12:11 infomaniac777

I'm sure a lot of people are looking forward to this.

infomaniac777 avatar Nov 26 '18 12:11 infomaniac777

@stephenhines: is this on the roadmap for the platform/toolchain?

DanAlbert avatar Nov 26 '18 19:11 DanAlbert

No, we have no timeline for when LSan will be available in Android.

stephenhines avatar Nov 26 '18 21:11 stephenhines

@stephenhines I have found LSan to be very useful in debugging memory leaks. Is there not enough demand for LSan on Android ?

infomaniac777 avatar Nov 27 '18 06:11 infomaniac777

It just isn't a priority at this time. We don't have the ability to take on every project that could be helpful.

stephenhines avatar Nov 27 '18 07:11 stephenhines

Ok. I understand.

infomaniac777 avatar Nov 27 '18 07:11 infomaniac777

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?

axnsan12 avatar Mar 14 '22 17:03 axnsan12

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".

stephenhines avatar Mar 14 '22 22:03 stephenhines

android still not support lsan yet? hope for a quick answer~

20083017 avatar Feb 16 '24 13:02 20083017

The quick answers are on this page. The bug is open and it's in the "unplanned" milestone.

DanAlbert avatar Feb 23 '24 23:02 DanAlbert