|
From: Brad F. <bra...@gm...> - 2006-10-04 00:51:10
|
Today, when attempting to run callgrind on a SDL/OpenGL app I'm developing, I got the following output: $ valgrind --tool=callgrind ./pathfind ==28501== Callgrind, a call-graph generating cache profiler. ==28501== Copyright (C) 2002-2006, and GNU GPL'd, by Josef Weidendorfer et al. ==28501== Using LibVEX rev 1606, a library for dynamic binary translation. ==28501== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==28501== Using valgrind-3.2.0, a dynamic binary instrumentation framework. ==28501== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==28501== For more details, rerun with: -v ==28501== ==28501== For interactive control, run 'callgrind_control -h'. unhandled opc_aux = 0x 1 first_opcode == 0xDB vex x86->IR: unhandled instruction bytes: 0xDB 0x8D 0xF0 0xDB ==28501== valgrind: Unrecognised instruction at address 0x4390741. ==28501== Your program just tried to execute an instruction that Valgrind ==28501== did not recognise. There are two possible reasons for this. ==28501== 1. Your program has a bug and erroneously jumped to a non-code ==28501== location. If you are running Memcheck and you just saw a ==28501== warning about a bad jump, it's probably your program's fault. ==28501== 2. The instruction is legitimate but Valgrind doesn't handle it, ==28501== i.e. it's Valgrind's fault. If you think this is the case or ==28501== you are not sure, please let us know and we'll try to fix it. ==28501== Either way, Valgrind will now raise a SIGILL signal which will ==28501== probably kill your program. ==28501== ==28501== Process terminating with default action of signal 4 (SIGILL) ==28501== Illegal opcode at address 0x4390741 ==28501== at 0x4390741: _XimParseStringFile (in /usr/lib/libX11.so.6.2.0) ==28501== by 0x438E51B: _XimLocalOpenIM (in /usr/lib/libX11.so.6.2.0) ==28501== by 0x4399B27: _XimOpenIM (in /usr/lib/libX11.so.6.2.0) ==28501== by 0x4376D89: XOpenIM (in /usr/lib/libX11.so.6.2.0) ==28501== by 0x4068F6D: (within /usr/lib/libSDL-1.2.so.0.11.0) ==28501== by 0x4071787: (within /usr/lib/libSDL-1.2.so.0.11.0) ==28501== by 0x40726B0: (within /usr/lib/libSDL-1.2.so.0.11.0) ==28501== by 0x4062D80: SDL_VideoInit (in /usr/lib/libSDL-1.2.so.0.11.0) ==28501== by 0x4036F79: SDL_InitSubSystem (in /usr/lib/libSDL- 1.2.so.0.11.0) ==28501== by 0x4036FB7: SDL_Init (in /usr/lib/libSDL-1.2.so.0.11.0) ==28501== by 0x8049126: main (in /home/bfish/svnwork/pathfind/pathfind) ==28501== ==28501== Events : Ir ==28501== Collected : 12042002 ==28501== ==28501== I refs: 12,042,002 Illegal instruction I'm running valgrind 3.2.0 on a Gentoo Linux box with GCC 4.1 and glibc 2.4. Funny thing is, I was able to successfully run callgrind with valgrind 3.1.1a few months ago on this same app with no problems. My first idea was to try downgrading valgrind to 3.1.1, but that failed with the same illegal instruction. The only major change on my system since I ran valgrind on this app successfully a few months ago was my recent switch to GCC 4.1 from 3.4. My -march hasn't changed at all (prescott). I've tried running valgrind on other SDL apps as well, and they all fail in the same manner. Any ideas what might be causing the problem? Any help would be appreciated. Brad |