-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how can build module with hwasan on android 10 #1290
Comments
This means that malloc was called before hwasan was initialized. Hwasan is
initialized in __hwasan_init, which is called from the first constructor of
any hwasan-instrumented library. It looks like libutils.so is not built
with hwasan, as well as libc.
Is the device image built with hwasan?
See https://source.android.com/devices/tech/debug/hwasan#using-hwasan
…On Thu, Aug 6, 2020 at 8:22 PM QihuaHuang ***@***.***> wrote:
i build module with hwasan following steps by:
1. build with flags: SANITIZE_TARGET:=hwaddress
2. push so file to device
but, i got this:
#00 pc 000000000001bf1c /system/lib64/
libclang_rt.hwasan-aarch64-android.so
(__hwasan::GetCurrentThread()+12) (BuildId:
5305c60a4101a2cd88c0fd38fb489a997d1c67de)
#1 <#1> pc 000000000001817c
/system/lib64/libclang_rt.hwasan-aarch64-android.so
(__hwasan::HwasanAllocate(__sanitizer::StackTrace*, unsigned long, unsigned
long, bool)+112) (BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de)
#2 <#2> pc 00000000000180e4
/system/lib64/libclang_rt.hwasan-aarch64-android.so
(__hwasan::hwasan_malloc(unsigned long, __sanitizer::StackTrace*)+24)
(BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de)
#3 <#3> pc 000000000001e7d4
/system/lib64/libclang_rt.hwasan-aarch64-android.so (operator
new(unsigned long)+108) (BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de)
#4 <#4> pc 0000000000016974
/system/lib64/libutils.so (android::add_sysprop_change_callback(void (*)(),
int)+72) (BuildId: f7c8a354465b908ebfc4497b6d157cac)
#5 <#5> pc 0000000000052358
/apex/com.android.runtime/bin/linker64 (_
*dl__ZL10call_arrayIPFviPPcS1_EEvPKcPT_mbS5*+276) (BuildId:
279f245e502d159f7b7a3163a10fa120)
#6 <#6> pc 0000000000052574
/apex/com.android.runtime/bin/linker64
(__dl__ZN6soinfo17call_constructorsEv+376) (BuildId:
279f245e502d159f7b7a3163a10fa120)
#7 <#7> pc 0000000000052480
/apex/com.android.runtime/bin/linker64
(__dl__ZN6soinfo17call_constructorsEv+132) (BuildId:
279f245e502d159f7b7a3163a10fa120)
#8 <#8> pc 000000000003cc34
/apex/com.android.runtime/bin/linker64
(__dl__Z9do_dlopenPKciPK17android_dlextinfoPKv+2416) (BuildId:
279f245e502d159f7b7a3163a10fa120)
#9 <#9> pc 0000000000038160
/apex/com.android.runtime/bin/linker64 (__loader_dlopen+68) (BuildId:
279f245e502d159f7b7a3163a10fa120)
#10 <#10> pc
0000000000001020 /apex/com.android.runtime/lib64/bionic/libdl.so
(dlopen+12) (BuildId: eaf850ad282e2aa45253983f09c5a3aa)
the libclang_rt.hwasan-aarch64-android.so is provided by android by
default
what does it means?
1. the default so file has bugs?
2. something must comiple with hwasan too?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1290>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADG4SQVKTBEJEBC2HPGPCTR7NXN7ANCNFSM4PXGRTXQ>
.
|
if the device image built with hwasan, then it can't bootup. my platfom is qcom |
On Mon, Aug 10, 2020 at 7:56 PM QihuaHuang ***@***.***> wrote:
This means that malloc was called before hwasan was initialized. Hwasan is
initialized in _
*hwasan_init, which is called from the first constructor of any
hwasan-instrumented library. It looks like libutils.so is not built with
hwasan, as well as libc. Is the device image built with hwasan? See
https://source.android.com/devices/tech/debug/hwasan#using-hwasan
<https://source.android.com/devices/tech/debug/hwasan#using-hwasan> …
<#m_-3117350459875082285_> On Thu, Aug 6, 2020 at 8:22 PM QihuaHuang @.>
wrote: i build module with hwasan following steps by: 1. build with flags:
SANITIZE_TARGET:=hwaddress 2. push so file to device but, i got this: #00
pc 000000000001bf1c /system/lib64/ libclang_rt.hwasan-aarch64-android.so
<http://libclang_rt.hwasan-aarch64-android.so>
(__hwasan::GetCurrentThread()+12) (BuildId:
5305c60a4101a2cd88c0fd38fb489a997d1c67de) #1
<#1> <#1
<#1>> pc 000000000001817c
/system/lib64/libclang_rt.hwasan-aarch64-android.so
<http://libclang_rt.hwasan-aarch64-android.so>
(__hwasan::HwasanAllocate(__sanitizer::StackTrace, unsigned long, unsigned
long, bool)+112) (BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de) #2
<#2> <#2
<#2>> pc 00000000000180e4
/system/lib64/libclang_rt.hwasan-aarch64-android.so
<http://libclang_rt.hwasan-aarch64-android.so>
(__hwasan::hwasan_malloc(unsigned long, __sanitizer::StackTrace)+24)
(BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de) #3
<#3> <#3
<#3>> pc 000000000001e7d4
/system/lib64/libclang_rt.hwasan-aarch64-android.so
<http://libclang_rt.hwasan-aarch64-android.so> (operator new(unsigned
long)+108) (BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de) #4
<#4> <#4
<#4>> pc 0000000000016974
/system/lib64/libutils.so (android::add_sysprop_change_callback(void ()(),
int)+72) (BuildId: f7c8a354465b908ebfc4497b6d157cac) #5
<#5> <#5
<#5>> pc 0000000000052358
/apex/com.android.runtime/bin/linker64 (*
*dl__ZL10call_arrayIPFviPPcS1_EEvPKcPT_mbS5*+276) (BuildId:
279f245e502d159f7b7a3163a10fa120) #6
<#6> <#6
<#6>> pc 0000000000052574
/apex/com.android.runtime/bin/linker64
(__dl__ZN6soinfo17call_constructorsEv+376) (BuildId:
279f245e502d159f7b7a3163a10fa120) #7
<#7> <#7
<#7>> pc 0000000000052480
/apex/com.android.runtime/bin/linker64
(__dl__ZN6soinfo17call_constructorsEv+132) (BuildId:
279f245e502d159f7b7a3163a10fa120) #8
<#8> <#8
<#8>> pc 000000000003cc34
/apex/com.android.runtime/bin/linker64
(__dl__Z9do_dlopenPKciPK17android_dlextinfoPKv+2416) (BuildId:
279f245e502d159f7b7a3163a10fa120) #9
<#9> <#9
<#9>> pc 0000000000038160
/apex/com.android.runtime/bin/linker64 (__loader_dlopen+68) (BuildId:
279f245e502d159f7b7a3163a10fa120) #10
<#10> <#10
<#10>> pc 0000000000001020
/apex/com.android.runtime/lib64/bionic/libdl.so (dlopen+12) (BuildId:
eaf850ad282e2aa45253983f09c5a3aa) the
libclang_rt.hwasan-aarch64-android.so is provided by android by default
what does it means? 1. the default so file has bugs? 2. something must
comiple with hwasan too? — You are receiving this because you are
subscribed to this thread. Reply to this email directly, view it on GitHub <
#1290 <#1290>>, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADG4SQVKTBEJEBC2HPGPCTR7NXN7ANCNFSM4PXGRTXQ
.
if the device image built with hwasan, then it can't bootup. my platfom is
qcom
This could mean that there are memory bugs that need to be fixed first.
There is an option of not building everything on the system image with
hwasan - libc.so is enough to run hwasan-instrumented binaries. See
https://source.android.com/devices/tech/debug/hwasan#using-hwasan.
… —
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1290 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADG4SXQRQ2WLKM73IRFBC3SACXO3ANCNFSM4PXGRTXQ>
.
|
i build module with hwasan following steps by:
but, i got this:
#00 pc 000000000001bf1c /system/lib64/libclang_rt.hwasan-aarch64-android.so (__hwasan::GetCurrentThread()+12) (BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de)
#1 pc 000000000001817c /system/lib64/libclang_rt.hwasan-aarch64-android.so (__hwasan::HwasanAllocate(__sanitizer::StackTrace*, unsigned long, unsigned long, bool)+112) (BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de)
#2 pc 00000000000180e4 /system/lib64/libclang_rt.hwasan-aarch64-android.so (__hwasan::hwasan_malloc(unsigned long, __sanitizer::StackTrace*)+24) (BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de)
#3 pc 000000000001e7d4 /system/lib64/libclang_rt.hwasan-aarch64-android.so (operator new(unsigned long)+108) (BuildId: 5305c60a4101a2cd88c0fd38fb489a997d1c67de)
#4 pc 0000000000016974 /system/lib64/libutils.so (android::add_sysprop_change_callback(void (*)(), int)+72) (BuildId: f7c8a354465b908ebfc4497b6d157cac)
#5 pc 0000000000052358 /apex/com.android.runtime/bin/linker64 (_dl__ZL10call_arrayIPFviPPcS1_EEvPKcPT_mbS5+276) (BuildId: 279f245e502d159f7b7a3163a10fa120)
#6 pc 0000000000052574 /apex/com.android.runtime/bin/linker64 (__dl__ZN6soinfo17call_constructorsEv+376) (BuildId: 279f245e502d159f7b7a3163a10fa120)
#7 pc 0000000000052480 /apex/com.android.runtime/bin/linker64 (__dl__ZN6soinfo17call_constructorsEv+132) (BuildId: 279f245e502d159f7b7a3163a10fa120)
#8 pc 000000000003cc34 /apex/com.android.runtime/bin/linker64 (__dl__Z9do_dlopenPKciPK17android_dlextinfoPKv+2416) (BuildId: 279f245e502d159f7b7a3163a10fa120)
#9 pc 0000000000038160 /apex/com.android.runtime/bin/linker64 (__loader_dlopen+68) (BuildId: 279f245e502d159f7b7a3163a10fa120)
#10 pc 0000000000001020 /apex/com.android.runtime/lib64/bionic/libdl.so (dlopen+12) (BuildId: eaf850ad282e2aa45253983f09c5a3aa)
the libclang_rt.hwasan-aarch64-android.so is provided by android by default
what does it means?
The text was updated successfully, but these errors were encountered: