Hi John: I run the same application with valgrind 3.12 . I can the same stack when the application is down with your command line or not. The same stack when the valgrind is down: Thread 1: status = VgTs_Runnable (lwpid 29062) ==29062== at 0x1089B6: compare_exchange_strong (atomic:943) ==29062== by 0x1089B6: atomic_compare_exchange_strong_explicit<unsigned int> (atomic:1376) ==29062== by 0x1089B6: main (testClang.cpp:22)
I think there maybe the bug in valgrind 3.13. Please check. So I send you the vgtrace.txt that is created by valgrind 3.12. I think it maybe helpful to you and valgrind is right . The Last vgtrace log is : (thumb) 0x1089BC: ldr.w r14, [r13, +#128] ------ IMark(0x1089BC, 4, 1) ------ t9 = 0x0:I32 PUT(392) = t9 t10 = 0x1:I32 t11 = GET:I32(60) t12 = Add32(t11,0x80:I32) t13 = GET:I32(64) t14 = GET:I32(64) t15 = if-strict (CmpNE32(t10,0x0:I32)) Ident32(LDle(t12)) else t14 PUT(64) = t15 PUT(68) = 0x1089C1:I32 (thumb) 0x1089C0: ldrex r3, [r14, #+0] ------ IMark(0x1089C0, 4, 1) ------ t16 = 0x0:I32 PUT(392) = t16 t17 = 0x1:I32 if (Not1(32to1(t17))) { PUT(68) = 0x1089C5:I32; exit-Boring } t18 = LDle-Linked(Add32(GET:I32(64),0x0:I32)) PUT(20) = t18 PUT(68) = 0x1089C5:I32 vex: external/valgrind/VEX/priv/guest_arm_toIR.c:13352 (decode_V8_instruction): Assertion `szBlg2 <= 3' failed. BR Owen -----邮件原件----- 发件人: 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
vgtrace_312.rar
Description: vgtrace_312.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