Bug 307106

Summary: unhandled instruction bytes: f0 0f c0 02 (lock xadd)
Product: [Developer tools] valgrind Reporter: Vasiliy Yeremeyev <vayerx>
Component: vexAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal CC: j+kdebugs, mark, maurice
Priority: NOR    
Version: 3.8.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Enable XADD Gb,Eb case

Description Vasiliy Yeremeyev 2012-09-20 14:49:44 UTC
Following instruction breaks valgrind execution on amd64 platform:
vex amd64->IR: unhandled instruction bytes: 0xF0 0xF 0xC0 0x2 0x83 0xC0 0x1 0x5D
vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=0F
vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0

f0 0f c0 02     lock xadd %al,(%rdx)
83 c0 01        add    $0x1,%eax

Reproducible: Always

Steps to Reproduce:
try to execute on amd64:
lock xadd %al,(%rdx)
add    $0x1,%eax




I've tried valgrind 3.8.0 and 3.8.1. valgrind is compiled without '--enable-only64bit' flag. The same problem was fixed for x86 platform according to 3.1.1 release notes (121662).
Comment 1 Mark Wielaard 2012-10-16 09:29:21 UTC
Created attachment 74576 [details]
Enable XADD Gb,Eb case

This is also https://bugzilla.redhat.com/show_bug.cgi?id=866793#c3 patch provided by Jakub Jelinek.
Comment 2 Mark Wielaard 2012-10-16 19:36:19 UTC
https://bugs.kde.org/show_bug.cgi?id=308333 contains a simple reproducer (with GCC 4.7).
Comment 3 Tom Hughes 2012-10-16 21:54:33 UTC
*** Bug 308333 has been marked as a duplicate of this bug. ***
Comment 4 Julian Seward 2012-12-06 17:29:31 UTC
Committed, r2581.  Thanks.
Comment 5 Julian Seward 2014-05-12 14:55:14 UTC
*** Bug 328089 has been marked as a duplicate of this bug. ***