I think there is something different when I run the valgrind with your command .
It show me that valgrind  die at :
Thread 1: status = VgTs_Runnable (lwpid 28961)
==28961==    at 0x4039698: __dl_syscall (syscall.S:45)
==28961==    by 0x40029A3: __dl__ZL24debuggerd_signal_handleriP7siginfoPv 
(debugger.cpp:295)
==28961==    by 0x4044CD7: ??? (__restore.S:58)

Not before :
Die at:
Thread 1: status = VgTs_Runnable (lwpid 29198)
==29198==    at 0x1089B6: compare_exchange_strong (atomic:943)
==29198==    by 0x1089B6: atomic_compare_exchange_strong_explicit<unsigned int> 
(atomic:1376)
==29198==    by 0x1089B6: main (testClang.cpp:22)

I send to the vgtrace.rar


-----邮件原件-----
发件人: John Reiser [mailto:jrei...@bitwagon.com] 
发送时间: 2017年9月13日 0:40
收件人: valgrind-users@lists.sourceforge.net
主题: Re: [Valgrind-users] 转发: [HELP] Is there any bug with the program built by 
the clang4.0 with thumbv7--linux-android command para.

>                  First, I build the program with clang 4.0 with 32 bit 
> command  param,  but  it run failed because there is unknown 
> instruction;

>                  disInstr(thumb): unhandled instruction: 0x450B 0xD104
> 
> ==24328== valgrind: Unrecognised instruction at address 0x1089c5.
> ==24328==    at 0x1089C4: compare_exchange_strong (atomic:943) 
> ==24328==    by 0x1089C4: 
> atomic_compare_exchange_strong_explicit<unsigned int> (atomic:1376) 
> ==24328==    by 0x1089C4: main (testClang.cpp:22)

It looks like there is some confusion because the program containing the 
supposed unhandled instruction stream:
===== foo.S
        .short 0x450B,0xD104
=====
disassembles (in Thumb mode) to
     $ gcc -c foo.S
     $ gdb foo.o
     (gdb) x/x 0
       0x0: 0xd104450b
     (gdb) x/2i 1    # 1 for Thumb mode
       0x1:     cmp     r3, r1
       0x3:     bne.n   0xe
which valgrind should handle easily.

Please re-run valgrind on the failing program, using additional parameters to 
valgrind:
     --trace-notbelow=0  --trace-flags=10000000  2>vgtrace.txt

which gives an instruction-by-instruction trace.  The re-directed stderr file 
vgtrace.txt will be large, possibly many megabytes.  Look near the end of the 
file for the last line that contains "==== SB nnnnn " where nnnnn is a decimal 
number of the block of instructions.  Please show us the output from there to 
the end of the file, probably a couple dozen lines.  Quite possibly it contains 
"ldrex r3, [lr]" or 0xE85E 0x3F00; but that should have been handled by the 
code in:
===== VEX/priv/guest_arm_toIR.c  l.22881
    /* ----------------- (T1) LDREX ----------------- */
    if (INSN0(15,4) == 0xE85 && INSN1(11,8) == BITS4(1,1,1,1)) { =====

-- 




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot 
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Attachment: vgtrace.rar
Description: vgtrace.rar

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to