How to build llvm-symbolizer tools for android

546 views
Skip to first unread message

Wu Chen

unread,
Dec 29, 2020, 3:54:35 AM12/29/20
to android-llvm
Hi,Android-llvm team:
According to https://source.android.com/devices/tech/debug/asan in the Symbolization “Ensure that the llvm-symbolizer binary is present in /system/bin. llvm-symbolizer is built from sources in third_party/llvm/tools/llvm-symbolizer.”
when I buid aosp source,I can‘t find llvm-symbolizer in /system/bin.so I try to cross build llvm-symbolizer and push into /system/bin.When I run the debugger. It has the following error reports

READ of size 4294967295 at 0x00585cf83100 thread T0
==14424==WARNING: Can't read from symbolizer at fd 3
==14424==WARNING: external symbolizer didn't start up correctly!
I really need your help, which will help me analyze the security problems and help me locate the abnormal code line number in the program.Is there a general way to compile llvm tools on Android 
platform

Thanks for your kind attention and look forward your prompt reply.
Wu Chen

Nick Desaulniers

unread,
Jan 5, 2021, 2:49:42 PM1/5/21
to Wu Chen, android-llvm
Can you run llvm-symbolizer via `adb shell /system/bin/llvm-symbolizer
--help`? Might not have been cross compiled correctly, not executable,
etc..
> --
> You received this message because you are subscribed to the Google Groups "android-llvm" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to android-llvm...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/android-llvm/84e74ded-3118-4029-b6ba-fd3ba74ac11dn%40googlegroups.com.



--
Thanks,
~Nick Desaulniers

Pirama Arumuga Nainar

unread,
Jan 5, 2021, 3:46:30 PM1/5/21
to Nick Desaulniers, Wu Chen, android-llvm
https://github.com/android/ndk/issues/753 tracks packaging llvm-symbolizer for the device but I don't think it's tracked for a particular NDK release.

If you're using the Android NDK, ndk-stack should also be able to symbolize asan reports as mentioned in the above NDK issue.


Reply all
Reply to author
Forward
0 new messages