Hi All,
I have cross-compiled Valgrind 3.3.1 to run on MontaVista Linux 2.6.10 on
CPU e500. However, when I try to run valgrind, I got the error as mentioned in
the attached Valgrind-3.3.1_output.txt file. I have used build system as RHEL 4
(Kernel 2.6.10) with gcc 3.3.1
Could anyone please help me out with this?
Before arriving on this error, I had issue with isel instruction and which
was solved by the description (plus the code given) for the BUG ID: 160954 and
for which I have put the fix in guest-ppc/toIR.c file. I was wondering if the
fix was fine, why it didn't get into the SVN?
CPU INFO
--------
processor : 0
cpu : e500
revision : 2.0 (pvr 8020 0020)
bogomips : 665.60
chipset : 8555E
Machine : CDA-911 - MPC8555E (10)
Boot bank : Normal
Boot level : 0xdc
Reset factor : 0x0
clock : 666MHz
PVR : 0x80200020
SVR : 0x80790011
PLL setting : 0x4
Memory : 512 MB
Output of objdump -d ld-2.3.3.so file where the error has been shown (vmhaddshs
- I guess so).
0000c254 <_dl_catch_error>:
c254: 94 21 fd 50 stwu r1,-688(r1)
c258: 7c 08 02 a6 mflr r0
c25c: 39 c0 02 98 li r14,664
c260: 48 01 bd a1 bl 28000 <_DYNAMIC+0xbc>
c264: 13 c1 73 20 vmhaddshs v30,v1,v14,v12
c268: 39 c0 02 a0 li r14,672
c26c: 7f c8 02 a6 mflr r30
c270: 13 e1 73 20 vmhaddshs v31,v1,v14,v12
c274: 81 3e 07 04 lwz r9,1796(r30)
c278: 90 01 02 b4 stw r0,692(r1)
c27c: 38 00 00 00 li r0,0
c280: 90 01 00 14 stw r0,20(r1)
c284: 90 81 02 74 stw r4,628(r1)
c288: 81 29 00 4c lwz r9,76(r9)
c28c: 90 a1 02 78 stw r5,632(r1)
c290: 90 c1 02 7c stw r6,636(r1)
c294: 7d 29 03 a6 mtctr r9
c298: 90 61 02 70 stw r3,624(r1)
c29c: 4e 80 04 21 bctrl
[EMAIL PROTECTED]:/jrc# valgrind test_str
==1505== Memcheck, a memory error detector.
==1505== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==1505== Using LibVEX rev 1854, a library for dynamic binary translation.
==1505== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==1505== Using valgrind-3.3.1, a dynamic binary instrumentation framework.
==1505== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==1505== For more details, rerun with: -v
==1505==
==1505== Invalid read of size 4
==1505== at 0xFFBE108: mempcpy (mc_replace_strmem.c:678)
==1505== by 0x4009F98: _dl_new_object (in /lib/ld-2.3.3.so)
==1505== by 0x4007DEC: _dl_map_object (in /lib/ld-2.3.3.so)
==1505== by 0x40042B8: dl_main (in /lib/ld-2.3.3.so)
==1505== by 0x400FB58: _dl_sysdep_start (in /lib/ld-2.3.3.so)
==1505== by 0x4004B30: _dl_start_final (in /lib/ld-2.3.3.so)
==1505== by 0x4004F74: _dl_start (in /lib/ld-2.3.3.so)
==1505== by 0x4010E18: _start (in /lib/ld-2.3.3.so)
==1505== Address 0x7efff0fc is just below the stack ptr. To suppress, use:
--workaround-gcc296-bugs=yes
disInstr(ppc): declined to decode an AltiVec insn.
disInstr(ppc): unhandled instruction: 0x13C17320
primary 4(0x4), secondary 800(0x320)
==1505== valgrind: Unrecognised instruction at address 0x400C264.
==1505== Your program just tried to execute an instruction that Valgrind
==1505== did not recognise. There are two possible reasons for this.
==1505== 1. Your program has a bug and erroneously jumped to a non-code
==1505== location. If you are running Memcheck and you just saw a
==1505== warning about a bad jump, it's probably your program's fault.
==1505== 2. The instruction is legitimate but Valgrind doesn't handle it,
==1505== i.e. it's Valgrind's fault. If you think this is the case or
==1505== you are not sure, please let us know and we'll try to fix it.
==1505== Either way, Valgrind will now raise a SIGILL signal which will
==1505== probably kill your program.
==1505==
==1505== Process terminating with default action of signal 4 (SIGILL)
==1505== Illegal opcode at address 0x400C264
==1505== at 0x400C264: _dl_catch_error (in /lib/ld-2.3.3.so)
==1505== by 0xC: ???
==1505== by 0x4002D30: dl_main (in /lib/ld-2.3.3.so)
==1505== by 0x400FB58: _dl_sysdep_start (in /lib/ld-2.3.3.so)
==1505== by 0x4004B30: _dl_start_final (in /lib/ld-2.3.3.so)
==1505== by 0x4004F74: _dl_start (in /lib/ld-2.3.3.so)
==1505== by 0x4010E18: _start (in /lib/ld-2.3.3.so)
disInstr(ppc): unhandled instruction: 0x0
primary 0(0x0), secondary 0(0x0)
==1505== valgrind: Unrecognised instruction at address 0xFFEF868.
==1505== Your program just tried to execute an instruction that Valgrind
==1505== did not recognise. There are two possible reasons for this.
==1505== 1. Your program has a bug and erroneously jumped to a non-code
==1505== location. If you are running Memcheck and you just saw a
==1505== warning about a bad jump, it's probably your program's fault.
==1505== 2. The instruction is legitimate but Valgrind doesn't handle it,
==1505== i.e. it's Valgrind's fault. If you think this is the case or
==1505== you are not sure, please let us know and we'll try to fix it.
==1505== Either way, Valgrind will now raise a SIGILL signal which will
==1505== probably kill your program.
==1505==
==1505== Process terminating with default action of signal 4 (SIGILL)
==1505== Illegal opcode at address 0xFFEF868
==1505== at 0xFFEF868: (within
/tmp/hiren/valgrind/lib/valgrind/ppc32-linux/vgpreload_core.so)
==1505== by 0x4028000: ???
==1505== by 0xC: ???
==1505== by 0x4002D30: dl_main (in /lib/ld-2.3.3.so)
==1505== by 0x400FB58: _dl_sysdep_start (in /lib/ld-2.3.3.so)
==1505== by 0x4004B30: _dl_start_final (in /lib/ld-2.3.3.so)
==1505== by 0x4004F74: _dl_start (in /lib/ld-2.3.3.so)
==1505== by 0x4010E18: _start (in /lib/ld-2.3.3.so)
==1505==
==1505== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 5 from 2)
==1505== malloc/free: in use at exit: 0 bytes in 0 blocks.
==1505== malloc/free: 0 allocs, 0 frees, 0 bytes allocated.
==1505== For counts of detected errors, rerun with: -v
==1505== All heap blocks were freed -- no leaks are possible.
Illegal instruction-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users