Bug 298335

Summary: Valgrind crashes after "vex amd64->IR: unhandled instruction bytes: 0xC5 0xF9 0x57 0xC0 0x48 0x8B 0x35 0x3"
Product: [Developer tools] valgrind Reporter: knut.heidemann
Component: vexAssignee: Julian Seward <jseward>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description knut.heidemann 2012-04-18 07:56:03 UTC
Hi!

uname -a: Linux knut-ThinkPad-X220 3.0.0-16-generic #29-Ubuntu SMP Tue Feb 14 12:48:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

This is what I get as an ouput when starting valgrind on my code:

knut@knut-ThinkPad-X220:~/repos/private/control/rods/BASim/build_07-11-2011/Apps/BASimulator$ valgrind -v ./BASimulator -r 8 -f options.txt -s solver.txt
==24908== Memcheck, a memory error detector
==24908== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==24908== Using Valgrind-3.8.0.SVN and LibVEX; rerun with -h for copyright info
==24908== Command: ./BASimulator -r 8 -f options.txt -s solver.txt
==24908== 
--24908-- Valgrind options:
--24908--    -v
--24908-- Contents of /proc/version:
--24908--   Linux version 3.0.0-16-generic (buildd@roseapple) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #29-Ubuntu SMP Tue Feb 14 12:48:51 UTC 2012
--24908-- Arch and hwcaps: AMD64, amd64-sse3-cx16
--24908-- Page sizes: currently 4096, max supported 4096
--24908-- Valgrind library directory: /usr/local/lib/valgrind
--24908-- Reading syms from /home/knut/repos/private/control/rods/BASim/build_07-11-2011/Apps/BASimulator/BASimulator (0x400000)
--24908-- Reading syms from /lib/x86_64-linux-gnu/ld-2.13.so (0x4000000)
--24908--   Considering /lib/x86_64-linux-gnu/ld-2.13.so ..
--24908--   .. CRC mismatch (computed 239c9234 wanted 624d705d)
--24908--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/ld-2.13.so ..
--24908--   .. CRC is valid
--24908-- Reading syms from /usr/local/lib/valgrind/memcheck-amd64-linux (0x38000000)
--24908--    object doesn't have a dynamic symbol table
--24908-- Scheduler: using generic scheduler lock implementation.
--24908-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
==24908== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-24908-by-knut-on-???
==24908== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-24908-by-knut-on-???
==24908== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-24908-by-knut-on-???
==24908== 
==24908== TO CONTROL THIS PROCESS USING vgdb (which you probably
==24908== don't want to do, unless you know exactly what you're doing,
==24908== or are doing some strange experiment):
==24908==   /usr/local/lib/valgrind/../../bin/vgdb --pid=24908 ...command...
==24908== 
==24908== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==24908==   /path/to/gdb ./BASimulator
==24908== and then give GDB the following command
==24908==   target remote | /usr/local/lib/valgrind/../../bin/vgdb --pid=24908
==24908== --pid is optional if only one valgrind process is running
==24908== 
--24908-- REDIR: 0x4017690 (strlen) redirected to 0x38061811 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--24908-- Reading syms from /usr/local/lib/valgrind/vgpreload_core-amd64-linux.so (0x4a23000)
--24908-- Reading syms from /usr/local/lib/valgrind/vgpreload_memcheck-amd64-linux.so (0x4c25000)
--24908-- REDIR: 0x4017500 (index) redirected to 0x4c29820 (index)
--24908-- REDIR: 0x4017580 (strcmp) redirected to 0x4c2a7e0 (strcmp)
--24908-- Reading syms from /home/knut/repos/private/control/rods/BASim/build_07-11-2011/BASim/src/libBASim.so (0x4e30000)
--24908-- Reading syms from /lib/x86_64-linux-gnu/libpng12.so.0.46.0 (0x5124000)
--24908--   Considering /lib/x86_64-linux-gnu/libpng12.so.0.46.0 ..
--24908--   .. CRC mismatch (computed b98a01aa wanted e40c0b7d)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /lib/x86_64-linux-gnu/libz.so.1.2.3.4 (0x534c000)
--24908--   Considering /lib/x86_64-linux-gnu/libz.so.1.2.3.4 ..
--24908--   .. CRC mismatch (computed b54939ee wanted d8f448b1)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/lapack/liblapack.so.3gf.0 (0x5564000)
--24908--   Considering /usr/lib/lapack/liblapack.so.3gf.0 ..
--24908--   .. CRC mismatch (computed 9e031c63 wanted 0f3366f9)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /home/knut/repos/private/control/rods/BASim/extlibs/libpardiso412-GNU450-X86-64.so (0x615a000)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/libblas/libblas.so.3gf.0 (0x65cc000)
--24908--   Considering /usr/lib/libblas/libblas.so.3gf.0 ..
--24908--   .. CRC mismatch (computed 3acc701f wanted 840f7f05)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libGLU.so.1.3.071100 (0x6866000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libGLU.so.1.3.071100 ..
--24908--   .. CRC mismatch (computed ff62151c wanted d73810fa)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2 (0x6ad3000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2 ..
--24908--   .. CRC mismatch (computed bbcdf0d0 wanted ed505026)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1 (0x6d2f000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1 ..
--24908--   .. CRC mismatch (computed 1af99dbe wanted 74761afd)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0 (0x6f37000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0 ..
--24908--   .. CRC mismatch (computed dcd894c7 wanted b63c426a)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 (0x7151000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 ..
--24908--   .. CRC mismatch (computed 73a0d8f0 wanted 0aaf2a88)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 (0x7489000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0 ..
--24908--   .. CRC mismatch (computed 1d428869 wanted 79cc9d07)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/libglut.so.3.9.0 (0x769c000)
--24908--   Considering /usr/lib/libglut.so.3.9.0 ..
--24908--   .. CRC mismatch (computed 7749992a wanted 8d5401b8)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 (0x78e2000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.16 ..
--24908--   .. CRC mismatch (computed 0897570d wanted 816d0d07)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /lib/x86_64-linux-gnu/libm-2.13.so (0x7be9000)
--24908--   Considering /lib/x86_64-linux-gnu/libm-2.13.so ..
--24908--   .. CRC mismatch (computed 4e6b4dc1 wanted 1e79dafa)
--24908--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libm-2.13.so ..
--24908--   .. CRC is valid
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 (0x7e6d000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libgomp.so.1.0.0 ..
--24908--   .. CRC mismatch (computed d04df267 wanted 54e1933c)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x807b000)
--24908--   Considering /lib/x86_64-linux-gnu/libgcc_s.so.1 ..
--24908--   .. CRC mismatch (computed d46494c8 wanted 768844ac)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.13.so (0x8291000)
--24908--   Considering /lib/x86_64-linux-gnu/libpthread-2.13.so ..
--24908--   .. CRC mismatch (computed 981f9a9f wanted 4b958e11)
--24908--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libpthread-2.13.so ..
--24908--   .. CRC is valid
--24908-- Reading syms from /lib/x86_64-linux-gnu/libc-2.13.so (0x84ae000)
--24908--   Considering /lib/x86_64-linux-gnu/libc-2.13.so ..
--24908--   .. CRC mismatch (computed e7964f05 wanted 8de95180)
--24908--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libc-2.13.so ..
--24908--   .. CRC is valid
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 (0x884f000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libgfortran.so.3.0.0 ..
--24908--   .. CRC mismatch (computed e3e63805 wanted cda8841a)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0 (0x8b65000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libglapi.so.0.0.0 ..
--24908--   .. CRC mismatch (computed 133f35d8 wanted ad969c2d)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0 (0x8d89000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libXdamage.so.1.1.0 ..
--24908--   .. CRC mismatch (computed 58969fe6 wanted 800007a9)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0 (0x8f8c000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0 ..
--24908--   .. CRC mismatch (computed eb19c267 wanted ae296b7d)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0 (0x9192000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1.0.0 ..
--24908--   .. CRC mismatch (computed 0cd2b4e7 wanted 7ba8482f)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0 (0x9398000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libdrm.so.2.4.0 ..
--24908--   .. CRC mismatch (computed c5ac9f5c wanted 4fe321f0)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.13.so (0x95a3000)
--24908--   Considering /lib/x86_64-linux-gnu/libdl-2.13.so ..
--24908--   .. CRC mismatch (computed 318daa90 wanted 12ac28da)
--24908--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/libdl-2.13.so ..
--24908--   .. CRC is valid
--24908-- Reading syms from /lib/x86_64-linux-gnu/libuuid.so.1.3.0 (0x97a7000)
--24908--   Considering /lib/x86_64-linux-gnu/libuuid.so.1.3.0 ..
--24908--   .. CRC mismatch (computed e71e6ffc wanted 37013bdd)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 (0x99ac000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 ..
--24908--   .. CRC mismatch (computed d4f9abcc wanted ec76accd)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /lib/x86_64-linux-gnu/librt-2.13.so (0x9bc8000)
--24908--   Considering /lib/x86_64-linux-gnu/librt-2.13.so ..
--24908--   .. CRC mismatch (computed 8832f78b wanted 6baa7c17)
--24908--   Considering /usr/lib/debug/lib/x86_64-linux-gnu/librt-2.13.so ..
--24908--   .. CRC is valid
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 (0x9dd0000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libquadmath.so.0.0.0 ..
--24908--   .. CRC mismatch (computed ed1e66a2 wanted 0a349e1e)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 (0xa006000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0 ..
--24908--   .. CRC mismatch (computed b421da05 wanted 2d2a1d0a)
--24908--    object doesn't have a symbol table
--24908-- Reading syms from /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 (0xa209000)
--24908--   Considering /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0 ..
--24908--   .. CRC mismatch (computed ff16b43d wanted 5b3f35a8)
--24908--    object doesn't have a symbol table
--24908-- REDIR: 0x8538090 (strncasecmp) redirected to 0x4a2360a (_vgnU_ifunc_wrapper)
--24908-- REDIR: 0x8535dd0 (strcasecmp) redirected to 0x4a2360a (_vgnU_ifunc_wrapper)
--24908-- REDIR: 0x8533e60 (__GI_strrchr) redirected to 0x4c29640 (__GI_strrchr)
--24908-- REDIR: 0x852d620 (calloc) redirected to 0x4c27c8b (calloc)
--24908-- REDIR: 0x852c360 (malloc) redirected to 0x4c29291 (malloc)
--24908-- REDIR: 0x8532360 (__GI_strlen) redirected to 0x4c29b80 (__GI_strlen)
--24908-- REDIR: 0x8532320 (strlen) redirected to 0x4a2360a (_vgnU_ifunc_wrapper)
--24908-- REDIR: 0x85d8970 (__strlen_sse42) redirected to 0x4c29b60 (strlen)
--24908-- REDIR: 0x853a760 (memcpy) redirected to 0x4a2360a (_vgnU_ifunc_wrapper)
--24908-- REDIR: 0x85e6c30 (__memcpy_ssse3_back) redirected to 0x4c2ad90 (memcpy)
--24908-- REDIR: 0x8534bd0 (memset) redirected to 0x4a2360a (_vgnU_ifunc_wrapper)
--24908-- REDIR: 0x8534c10 (__GI_memset) redirected to 0x4c2bc40 (memset)
--24908-- REDIR: 0x85308e0 (strcmp) redirected to 0x4a2360a (_vgnU_ifunc_wrapper)
--24908-- REDIR: 0x85ce710 (__strcmp_sse42) redirected to 0x4c2a720 (strcmp)
vex amd64->IR: unhandled instruction bytes: 0xC5 0xF9 0x57 0xC0 0x48 0x8B 0x35 0x3
==24908== valgrind: Unrecognised instruction at address 0x4ef468a.
==24908==    at 0x4EF468A: global constructors keyed to RodForce.cc (in /home/knut/repos/private/control/rods/BASim/build_07-11-2011/BASim/src/libBASim.so)
==24908==    by 0x400EB55: call_init.part.0 (dl-init.c:85)
==24908==    by 0x400EC2E: _dl_init (dl-init.c:52)
==24908==    by 0x40015E9: ??? (in /lib/x86_64-linux-gnu/ld-2.13.so)
==24908==    by 0x6: ???
==24908==    by 0x7FEFFFEAA: ???
==24908==    by 0x7FEFFFEB8: ???
==24908==    by 0x7FEFFFEBB: ???
==24908==    by 0x7FEFFFEBD: ???
==24908==    by 0x7FEFFFEC0: ???
==24908==    by 0x7FEFFFECC: ???
==24908==    by 0x7FEFFFECF: ???
==24908== Your program just tried to execute an instruction that Valgrind
==24908== did not recognise.  There are two possible reasons for this.
==24908== 1. Your program has a bug and erroneously jumped to a non-code
==24908==    location.  If you are running Memcheck and you just saw a
==24908==    warning about a bad jump, it's probably your program's fault.
==24908== 2. The instruction is legitimate but Valgrind doesn't handle it,
==24908==    i.e. it's Valgrind's fault.  If you think this is the case or
==24908==    you are not sure, please let us know and we'll try to fix it.
==24908== Either way, Valgrind will now raise a SIGILL signal which will
==24908== probably kill your program.
==24908== 
==24908== Process terminating with default action of signal 4 (SIGILL)
==24908==  Illegal opcode at address 0x4EF468A
==24908==    at 0x4EF468A: global constructors keyed to RodForce.cc (in /home/knut/repos/private/control/rods/BASim/build_07-11-2011/BASim/src/libBASim.so)
==24908==    by 0x400EB55: call_init.part.0 (dl-init.c:85)
==24908==    by 0x400EC2E: _dl_init (dl-init.c:52)
==24908==    by 0x40015E9: ??? (in /lib/x86_64-linux-gnu/ld-2.13.so)
==24908==    by 0x6: ???
==24908==    by 0x7FEFFFEAA: ???
==24908==    by 0x7FEFFFEB8: ???
==24908==    by 0x7FEFFFEBB: ???
==24908==    by 0x7FEFFFEBD: ???
==24908==    by 0x7FEFFFEC0: ???
==24908==    by 0x7FEFFFECC: ???
==24908==    by 0x7FEFFFECF: ???
--24908-- REDIR: 0x852c960 (free) redirected to 0x4c285cd (free)
==24908== 
==24908== HEAP SUMMARY:
==24908==     in use at exit: 814,413 bytes in 16 blocks
==24908==   total heap usage: 20 allocs, 4 frees, 822,553 bytes allocated
==24908== 
==24908== Searching for pointers to 16 not-freed blocks
==24908== Checked 2,399,432 bytes
==24908== 
==24908== LEAK SUMMARY:
==24908==    definitely lost: 0 bytes in 0 blocks
==24908==    indirectly lost: 0 bytes in 0 blocks
==24908==      possibly lost: 0 bytes in 0 blocks
==24908==    still reachable: 814,413 bytes in 16 blocks
==24908==         suppressed: 0 bytes in 0 blocks
==24908== Rerun with --leak-check=full to see details of leaked memory
==24908== 
==24908== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
--24908-- 
--24908-- used_suppression:      2 U1004-ARM-_dl_relocate_object
==24908== 
==24908== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2)
Ungültiger Maschinenbefehl

Unfortunately I cannot come up with a simple example code. 

Kind regards,
Knut.

Reproducible: Always




Might it be related to the usage of OpenGL?
Comment 1 Julian Seward 2012-07-05 07:51:59 UTC

*** This bug has been marked as a duplicate of bug 273475 ***