Hello everyone,

I am pretty new to both Valgrind and Android -- recently I am working on 
using Valgrind to check the running of some Android apps. I have 
successfully built Valgrind as instructed in the README and pushed it into 
my emulator. I used "android setprop wrap...." to redirect the app to be 
launched through Valgrind, however, I am getting the following error for all 
the apps launched by Valgrind:

================from the logcat =================================
I/val.sh  ( 1259): disInstr(thumb): unhandled instruction: 0xEEBA 0x7BEF
I/val.sh  ( 1259): ==1260== valgrind: Unrecognised instruction at address 
0xcab86ad.
I/val.sh  ( 1259): ==1260==    at 0xCAB86AC: ??? (in 
/system/lib/libjavacore.so)
I/val.sh  ( 1259): ==1260== Your program just tried to execute an 
instruction that Valgrind
I/val.sh  ( 1259): ==1260== 1. Your program has a bug and erroneously jumped 
to a non-code
I/val.sh  ( 1259): ==1260==    location.  If you are running Memcheck and 
you just saw a
I/val.sh  ( 1259): ==1260==    warning about a bad jump, it's probably your 
program's fault.
I/val.sh  ( 1259): ==1260== 2. The instruction is legitimate but Valgrind 
doesn't handle it,
I/val.sh  ( 1259): ==1260==    i.e. it's Valgrind's fault.  If you think 
this is the case or
I/val.sh  ( 1259): ==1260==    you are not sure, please let us know and 
we'll try to fix it.
I/val.sh  ( 1259): ==1260== Either way, Valgrind will now raise a SIGILL 
signal which will
I/val.sh  ( 1259): ==1260== probably kill your program.
I/val.sh  ( 1259): ==1260== Conditional jump or move depends on 
uninitialised value(s)
I/val.sh  ( 1259): ==1260==    at 0x4005224: ??? (in /system/bin/linker)
I/val.sh  ( 1259): ==1260== 
F/libc    ( 1260): Fatal signal 4 (SIGILL) at 0x0cadd8f0 (code=1), thread 
1260 (m.gstar.wponlyn)
I/val.sh  ( 1259): disInstr(thumb): unhandled instruction: 0xEEBA 0x7BEF
I/val.sh  ( 1259): ==1260== valgrind: Unrecognised instruction at address 
0xcab86ad.
I/val.sh  ( 1259): ==1260== valgrind: Unrecognised instruction at address 
0xcab86ad.
I/val.sh  ( 1259): ==1260==    at 0xCAB86AC: ??? (in 
/system/lib/libjavacore.so)
I/val.sh  ( 1259): ==1260== Your program just tried to execute an 
instruction that Valgrind
I/val.sh  ( 1259): ==1260== did not recognise.  There are two possible 
reasons for this.
I/val.sh  ( 1259): ==1260== 1. Your program has a bug and erroneously jumped 
to a non-code
I/val.sh  ( 1259): ==1260==    location.  If you are running Memcheck and 
you just saw a
I/val.sh  ( 1259): ==1260==    warning about a bad jump, it's probably your 
program's fault.
I/val.sh  ( 1259): ==1260== 2. The instruction is legitimate but Valgrind 
doesn't handle it,
I/val.sh  ( 1259): ==1260==    i.e. it's Valgrind's fault.  If you think 
this is the case or
I/val.sh  ( 1259): ==1260==    you are not sure, please let us know and 
we'll try to fix it.
I/val.sh  ( 1259): ==1260== Either way, Valgrind will now raise a SIGILL 
signal which will
I/val.sh  ( 1259): ==1260== probably kill your program.
I/val.sh  ( 1259): ==1260== 
I/val.sh  ( 1259): ==1260== Process terminating with default action of 
signal 4 (SIGILL)
I/val.sh  ( 1259): ==1260==  Illegal opcode at address 0xCAB86AD
I/val.sh  ( 1259): ==1260== Process terminating with default action of 
signal 4 (SIGILL)
I/val.sh  ( 1259): ==1260==  Illegal opcode at address 0xCAB86AD
I/val.sh  ( 1259): ==1260==    at 0xCAB86AC: ??? (in 
/system/lib/libjavacore.so)
I/val.sh  ( 1259): ==1260== 
I/val.sh  ( 1259): ==1260== HEAP SUMMARY:
I/val.sh  ( 1259): ==1260==     in use at exit: 344,162 bytes in 842 blocks
I/val.sh  ( 1259): ==1260==   total heap usage: 3,895 allocs, 3,053 frees, 
2,512,927 bytes allocated
I/val.sh  ( 1259): ==1260== 
D/dalvikvm( 1210): GC_FOR_ALLOC freed 422K, 8% free 5276K/5724K, paused 
591ms, total 802ms
I/val.sh  ( 1259): ==1260== LEAK SUMMARY:
I/val.sh  ( 1259): ==1260==    definitely lost: 2,618 bytes in 66 blocks
I/val.sh  ( 1259): ==1260==    indirectly lost: 26,528 bytes in 66 blocks
I/val.sh  ( 1259): ==1260==      possibly lost: 7,526 bytes in 180 blocks
I/val.sh  ( 1259): ==1260==    still reachable: 307,490 bytes in 530 blocks
I/val.sh  ( 1259): ==1260==         suppressed: 0 bytes in 0 blocks
I/val.sh  ( 1259): ==1260== Rerun with --leak-check=full to see details of 
leaked memory
I/val.sh  ( 1259): ==1260== 
I/val.sh  ( 1259): ==1260== Use --track-origins=yes to see where 
uninitialised values come from
I/val.sh  ( 1259): ==1260== ERROR SUMMARY: 9 errors from 3 contexts 
(suppressed: 0 from 0)

============================================================
after this point, the app is killed....

val.sh is the script that setprop used to launch app from valgrind.

Can anyone help me out with this weird behavior? Thanks!


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to