root@BS_T0_00:/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