Libopcodes produces invalid 32-bit address for a 64-bit MPX instruction. Output: addr32 bndstx %bnd0, -0x76a5963e(%eip) # 0xffffffff895a69cb Bytes: 67 41 0f 1b 05 c2 69 5a 89 This instruction should be shown as invalid because 64-bit MPX instructions cannot act on 32-bit addresses.
The master branch has been updated by H.J. Lu <hjl@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=285963233bc7509edb07c035426ee0096650b0af commit 285963233bc7509edb07c035426ee0096650b0af Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Oct 18 09:06:27 2016 -0700 Check addr32flag instead of sizeflag for rip/eip Since the address size prefix, 0x67, is ignored for MPX instructions in 64-bit mode, we should check addr32flag instead of sizeflag for rip/eip. PR binutis/20699 * i386-dis.c (OP_E_memory): Check addr32flag instead of sizeflag for rip/eip.
(In reply to nholcomb from comment #0) > Libopcodes produces invalid 32-bit address for a 64-bit MPX instruction. > > Output: addr32 bndstx %bnd0, -0x76a5963e(%eip) # 0xffffffff895a69cb > Bytes: 67 41 0f 1b 05 c2 69 5a 89 > > This instruction should be shown as invalid because 64-bit MPX instructions > cannot act on 32-bit addresses. Since the addr32 prefix is ignored in 64-bit mode, I checked in a patch to display 67 41 0f 1b 05 c2 69 5a 89 addr32 bndstx %bnd0,-0x76a5963e(%rip)