Its not about a real memory issue is about detecting it on android via clang sanatizer.
Steps to Reproduce
Hi all,
II was playing around with the clang sanatizer. I used the 3d example project with 5.5.4 as a base and modified the build to use clang sanatizer in the process. As a base of that I used
I used both ways of building it (command line and also later via visual studios nmake). The compiles seems fine and in get an .apk which is including the expected clang library.
[Image Removed]
Next I added some intentionally memory corruption to the project ( some heap overwriding, some forgotten allocation, some double frees, … ) to check how the reporting of those will look like.
Sadly I didnt see any difference or any log messages indicating that the sanatizer is doing or checking anything. The documentation at least says that something should be expected in the log.
Quote:
“When you run your application, you will see the sanitizer’s error detection output in your logs. You can run these builds directly through a command line, or you can open your project’s Properties in Visual Studio, then add the sanitizer’s command to NMake> Build Command Line.”
I tried different combinations here and both version of the sanatizer ( ASan and HWASan ) and also different version of SDK/NDKs here. I think the last version in the repro project tried is 27
Is there a point that Im missing here ?
Hi Carsten,
Can you confirm which device you are testing on?
There are some known issues with HWAsan on Android 15, and ASan is officially deprecated as of Android 14.
Best regards.
I tested it on two different devices. One was an Samsung S41 with 12 on it, and the 2nd one was an A16 with 14 on.
And yes I saw the requirements in the docs so I tested both version of the sanatizer on both devices.
Hi Carsten,
There was/is a bug with hwasan and NDK that breaks some memset, etc functions, it was reported to Google and they sent us a patched header for NDK. Let us know if this helps. Otherwise, can you include an application log?
Best regards.
Thanks Stéphane,
I will check it out.
Don’t hesitate to reach out if problem persists and requires further investigation.
Best regards.