Bug 334665 - vex x86->IR: unhandled instruction bytes: 0xC4 0xE2 0x73 0xF7
Summary: vex x86->IR: unhandled instruction bytes: 0xC4 0xE2 0x73 0xF7
Status: RESOLVED INTENTIONAL
Alias: None
Product: valgrind
Classification: Developer tools
Component: vex (show other bugs)
Version: 3.8.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-12 14:10 UTC by fuzzball81
Modified: 2014-09-02 22:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fuzzball81 2014-05-12 14:10:17 UTC
Running valgrind against any application I get an unhandled instruction error. I have tried several application as well as trying to recompile glibc and valgrind removing specific sse instructions as detailed on several websites. These changes seem to just move what instruction is unhandled.

Reproducible: Always

Steps to Reproduce:
Haswell i7-4770_CPU_@_3.40GHz with gcc-4.7.3, glibc-2.17
CFLAGS="-O2 -march=native -pipe -g"
CXXFLAGS="-O2 -march=native -pipe -g"

1. Fresh gentoo install with the above settings
2. valgrind -v ls
Actual Results:  
==18846== Memcheck, a memory error detector
==18846== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==18846== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==18846== Command: ls
==18846== 
--18846-- Valgrind options:
--18846--    -v
--18846-- Contents of /proc/version:
--18846--   Linux version 3.12.13-gentoo (xxx@xxx) (gcc version 4.7.3 (Gentoo 4.7.3-r1 p1.4, pie-0.5.5) ) #7 SMP PREEMPT Mon Apr 28 11:17:31 EDT 2014
--18846-- Arch and hwcaps: X86, x86-sse1-sse2
--18846-- Page sizes: currently 4096, max supported 4096
--18846-- Valgrind library directory: /usr/lib/valgrind
--18846-- Reading syms from /lib/ld-2.17.so
--18846--   Considering /usr/lib/debug/lib/ld-2.17.so.debug ..
--18846--   .. CRC is valid
--18846-- Reading syms from /bin/ls
--18846--    object doesn't have a symbol table
--18846-- Reading syms from /usr/lib/valgrind/memcheck-x86-linux
--18846--   Considering /usr/lib/debug/usr/lib/valgrind/memcheck-x86-linux.debug ..
--18846--   .. CRC is valid
--18846--    object doesn't have a dynamic symbol table
--18846-- Scheduler: using generic scheduler lock implementation.
--18846-- Reading suppressions file: /usr/lib/valgrind/default.supp
==18846== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-18846-by-xxx-on-???
==18846== embedded gdbserver: writing to   /tmp/vgdb-pipe-to-vgdb-from-18846-by-xxx-on-???
==18846== embedded gdbserver: shared mem   /tmp/vgdb-pipe-shared-mem-vgdb-18846-by-xxx-on-???
==18846== 
==18846== TO CONTROL THIS PROCESS USING vgdb (which you probably
==18846== don't want to do, unless you know exactly what you're doing,
==18846== or are doing some strange experiment):
==18846==   /usr/lib/valgrind/../../bin/vgdb --pid=18846 ...command...
==18846== 
==18846== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==18846==   /path/to/gdb ls
==18846== and then give GDB the following command
==18846==   target remote | /usr/lib/valgrind/../../bin/vgdb --pid=18846
==18846== --pid is optional if only one valgrind process is running
==18846== 
--18846-- REDIR: 0x40183f0 (strlen) redirected to 0x3806a2a4 (vgPlain_x86_linux_REDIR_FOR_strlen)
vex x86->IR: unhandled instruction bytes: 0xC4 0xE2 0x73 0xF7
==18846== valgrind: Unrecognised instruction at address 0x400db76.
==18846==    at 0x400DB76: _dl_important_hwcaps (dl-hwcaps.c:52)
==18846==    by 0x4007BE6: _dl_init_paths (dl-load.c:727)
==18846==    by 0x40026EE: dl_main (rtld.c:1343)
==18846==    by 0x4015037: _dl_sysdep_start (dl-sysdep.c:241)
==18846==    by 0x40011F6: ??? (in /lib/ld-2.17.so)
==18846== Your program just tried to execute an instruction that Valgrind
==18846== did not recognise.  There are two possible reasons for this.
==18846== 1. Your program has a bug and erroneously jumped to a non-code
==18846==    location.  If you are running Memcheck and you just saw a
==18846==    warning about a bad jump, it's probably your program's fault.
==18846== 2. The instruction is legitimate but Valgrind doesn't handle it,
==18846==    i.e. it's Valgrind's fault.  If you think this is the case or
==18846==    you are not sure, please let us know and we'll try to fix it.
==18846== Either way, Valgrind will now raise a SIGILL signal which will
==18846== probably kill your program.
==18846== 
==18846== Process terminating with default action of signal 4 (SIGILL)
==18846==  Illegal opcode at address 0x400DB76
==18846==    at 0x400DB76: _dl_important_hwcaps (dl-hwcaps.c:52)
==18846==    by 0x4007BE6: _dl_init_paths (dl-load.c:727)
==18846==    by 0x40026EE: dl_main (rtld.c:1343)
==18846==    by 0x4015037: _dl_sysdep_start (dl-sysdep.c:241)
==18846==    by 0x40011F6: ??? (in /lib/ld-2.17.so)
==18846== 
==18846== HEAP SUMMARY:
==18846==     in use at exit: 0 bytes in 0 blocks
==18846==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
==18846== 
==18846== All heap blocks were freed -- no leaks are possible
==18846== 
==18846== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==18846== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Illegal instruction

Expected Results:  
Valgrind runs normally
Comment 1 Julian Seward 2014-09-02 22:01:37 UTC
That's probably an AVX instruction.  Try as a 64 bit process.  AVX isn't
supported for 32 bit processes.