ndk-samples icon indicating copy to clipboard operation
ndk-samples copied to clipboard

Feature request: A sample show how to built with the NDK under Address Sanitizer.

Open Romantic-LiXuefeng opened this issue 4 years ago • 1 comments

As the title, I'm not clear how to use Address Sanitizer in Android studio with native code, Hope give a sample show how to use it. thanks!

Romantic-LiXuefeng avatar Jun 03 '20 03:06 Romantic-LiXuefeng

In this subject, there probably 3 options:

  • Generic Asan : https://developer.android.com/ndk/guides/asan#cmake
  • HWAsan( need special OS build ): https://developer.android.com/ndk/guides/hwasan
  • GWP-ASan (Android 11+): https://developer.android.com/ndk/guides/gwp-asan

They are not programming feature/new APIs, just tools. Tools are better described with docs or codelabs. Which doc are you referring to?

Sometimes, the docs on developer.android.com/ndk assume that people already have rich domain knowledge about that specific topic: might need to be expanded to provide the whole picture.

ggfan avatar Jun 04 '20 22:06 ggfan

https://github.com/android/ndk-samples/tree/main/sanitizers

DanAlbert avatar May 03 '24 22:05 DanAlbert