Hi,
I wonder if anyone ever tried valgrind in arm64-android.
I was trying valgrind to investigate malloc/free related bugs in
android-64. However, even though valgrind was successfully built, android
cannot still lunch an APP with valgrind and had the following errors:
I/ActivityManager( 2262): START u0
{act=android.intent.action.MAIN flg=0x10000000
cmp=com.example.hellojni/.HelloJni}
from pid 3393
I/art ( 3408): Not late-enabling -Xcheck:jni (already on)
I/val.sh ( 3426): ==3427== Memcheck, a memory error detector
I/val.sh ( 3426): ==3427== Copyright (C) 2002-2013, and GNU GPL'd, by
Julian Seward et al.
I/val.sh ( 3426): ==3427== Using Valgrind-3.10.0.SVN and LibVEX; rerun with
-h for copyright info
I/val.sh ( 3426): ==3427== Command: /system/bin/app_process /system/bin
--application --nice-name=com.example.hellojni
com.android.internal.os.WrapperInit 12 3 android.app.ActivityThread
I/val.sh ( 3426): ==3427==
I/val.sh ( 3426): ARM64 front end: load_store
I/val.sh ( 3426): disInstr(arm64): unhandled instruction 0x4CDFA041
I/val.sh ( 3426): disInstr(arm64): 0100'1100 1101'1111 1010'0000 0100'0001
I/val.sh ( 3426): ==3427== valgrind: Unrecognised instruction at address
0x4007b60.
I/val.sh ( 3426): ==3427== at 0x4007B60: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x4004083: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400447B: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x4004C6B: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x4005E0B: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400250F: _start (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400250F: _start (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400250F: _start (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400250F: _start (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400250F: _start (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400250F: _start (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400250F: _start (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== Your program just tried to execute an
instruction that Valgrind
I/val.sh ( 3426): ==3427== did not recognise. There are two possible
reasons for this.
I/val.sh ( 3426): ==3427== 1. Your program has a bug and erroneously jumped
to a non-code
I/val.sh ( 3426): ==3427== location. If you are running Memcheck and you
just saw a
I/val.sh ( 3426): ==3427== warning about a bad jump, it's probably your
program's fault.
I/val.sh ( 3426): ==3427== 2. The instruction is legitimate but Valgrind
doesn't handle it,
I/val.sh ( 3426): ==3427== i.e. it's Valgrind's fault. If you think this is
the case or
I/val.sh ( 3426): ==3427== you are not sure, please let us know and we'll
try to fix it.
I/val.sh ( 3426): ==3427== Either way, Valgrind will now raise a SIGILL
signal which will
I/val.sh ( 3426): ==3427== probably kill your program.
I/val.sh ( 3426): ==3427==
I/val.sh ( 3426): ==3427== Process terminating with default action of
signal 11 (SIGSEGV)
I/val.sh ( 3426): ==3427== Bad permissions for mapped region at address
0x401CFC0
I/val.sh ( 3426): ==3427== at 0x400B854: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x40025FB: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427== by 0x400BAF7: ??? (in /system/bin/linker64)
I/val.sh ( 3426): ==3427==
I/val.sh ( 3426): ==3427== HEAP SUMMARY:
I/val.sh ( 3426): ==3427== in use at exit: 0 bytes in 0 blocks
I/val.sh ( 3426): ==3427== total heap usage: 0 allocs, 0 frees, 0 bytes
allocated
I/val.sh ( 3426): ==3427==
I/val.sh ( 3426): ==3427== All heap blocks were freed – no leaks are
possible
I/val.sh ( 3426): ==3427==
I/val.sh ( 3426): ==3427== For counts of detected and suppressed errors,
rerun with: -v
I/val.sh ( 3426): ==3427== ERROR SUMMARY: 0 errors from 0 contexts
(suppressed: 0 from 0)
I/val.sh ( 3426): val.sh terminated by signal 11
I/Zygote ( 1885): Process 3408 exited cleanly (246)
W/Zygote ( 1885): Error reading pid from wrapped process, child may have
died
W/Zygote ( 1885): java.io.EOFException
W/Zygote ( 1885): at libcore.io.Streams.readFully(Streams.java:83)
W/Zygote ( 1885): at
java.io.DataInputStream.readInt(DataInputStream.java:103)
W/Zygote ( 1885): at
com.android.internal.os.ZygoteConnection.handleParentProc(ZygoteConnection.java:933)
W/Zygote ( 1885): at
com.android.internal.os.ZygoteConnection.runOnce(ZygoteConnection.java:251)
W/Zygote ( 1885): at
com.android.internal.os.ZygoteInit.runSelectLoop(ZygoteInit.java:721)
W/Zygote ( 1885): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:627)
I/ActivityManager( 2262): Start proc com.example.hellojni for activity
com.example.hellojni/.HelloJni: pid=3408 uid=10051 gids=
{50051, 9997, 1028, 1015}
abi=arm64-v8a
D/AndroidRuntime( 3393): Shutting down VM
I saw aosp repo just disabled arm64 build few days ago (
https://android.googlesource.com/platform/external/valgrind/+/3eb9932390b64e5cb416086b329fea2ecfdd49f3
)
and valgrind official site does not claim that it supports arm64-android,
either.
So I'm curious that did anyone ever tried valgrind in arm64-android.
--
潘穎軒 Yingshiuan (Peter) Pan
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users