Bug 147498 - vex amd64->IR: unhandled instruction bytes: 0xF0 0xF 0xB0 0xF
Summary: vex amd64->IR: unhandled instruction bytes: 0xF0 0xF 0xB0 0xF
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: vex (show other bugs)
Version: 3.2.3
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-03 16:34 UTC by Valery Ushakov
Modified: 2010-10-05 17:06 UTC (History)
1 user (show)

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 Valery Ushakov 2007-07-03 16:34:09 UTC
$ uname -a
Linux pblcbr003 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 
x86_64 x86_64 GNU/Linux

$ valgrind --version
valgrind-3.2.3

From the valgrind output:
----8<----
vex amd64->IR: unhandled instruction bytes: 0xF0 0xF 0xB0 0xF
==2524== valgrind: Unrecognised instruction at address 0x6A960A0.
----8<----

$ objdump --disassemble-all --target binary --architecture i386:x86-64 F00FB00F 
 
F00FB00F:     file format binary
 
Disassembly of section .data:
 
0000000000000000 <.data>:
   0:   f0 0f b0 0f             lock cmpxchg %cl,(%rdi)


In VEX/priv/guest-amd64/toIR.c the relevant case seems to be commented out:

      /* =-=-=-=-=-=-=-=-=- CMPXCHG -=-=-=-=-=-=-=-=-=-= */
 
//..       case 0xB0: /* CMPXCHG Gb,Eb */
//..          delta = dis_cmpxchg_G_E ( sorb, 1, delta );
//..          break;
Comment 1 Wayne Arnold 2007-09-11 23:54:20 UTC
I'm getting a similar unhandled exception in the Intel Threaded Building Blocks library libtbb.so

vex amd64->IR: unhandled instruction bytes: 0xF0 0x41 0xF 0xB0
==19165== valgrind: Unrecognised instruction at address 0xD98690D.
==19165==  Illegal opcode at address 0xD98690D
==19165==    at 0xD98690D: tbb::internal::micro_queue::push(void const*, unsigne
d long, tbb::internal::concurrent_queue_base&) (in lib/libtbb.so)
==19165==    by 0xD986832: tbb::internal::concurrent_queue_base::internal_push(v
oid const*) (in lib/libtbb.so)


e909:   b0 00                   mov    $0x0,%al
e90b:   b2 01                   mov    $0x1,%dl
e90d:   f0 41 0f b0 55 20       lock cmpxchg %dl,0x20(%r13)
Comment 2 Wayne Arnold 2007-09-12 15:10:51 UTC
The easiest way to reproduce this is to download the Intel opensource TBB files and build, then run test_assembly.exe under valgrind

http://osstbb.intel.com/ver.php?fid=72

download, extract the source and oss_lin binary libraries
type make in the top level source directory

Will make all the examples.  running test program  test_assembly.exe will hit the illegal instruction
Comment 3 achampen 2007-09-22 00:21:54 UTC
*** This bug has been confirmed by popular vote. ***
Comment 4 Julian Seward 2007-11-16 01:19:30 UTC
Fixed (vex r1795).  Will be in 3.3.0.  Please verify.
Comment 5 Valery Ushakov 2008-01-17 03:03:54 UTC
Verified.  3.3.0 works with TBB out of the box.
Comment 6 plaid.octopus 2010-10-05 17:06:11 UTC
valgrind crashes with the following version combination:

  valgrind-3.5.0 
  tbb30_056oss (linux_intel64_gcc_cc3.4.6_libc2.5_kernel2.6.18_release)

Has this patch been maintained in valgrind 3.5.0?