Bug 272971

Summary: ia32 valgrind doesn't support enter/leave
Product: [Developer tools] valgrind Reporter: Pierre Habouzit <madcoder>
Component: generalAssignee: Julian Seward <jseward>
Status: CONFIRMED ---    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Pierre Habouzit 2011-05-10 20:54:38 UTC
Although it seems that nobody still uses it, the ENTER instruction is
supported by all ia32 processors and valgrind chokes on it: 

vex x86->IR: unhandled instruction bytes: 0xC8 0x0 0x0 0x0
==12372== valgrind: Unrecognised instruction at address 0x8049D37.

The disassemble is:

 8049d37:       c8 00 00 00             enter  $0x0,$0x0

The program runs perfectly without valgrind

Below is a test program which triggers this error. Compile with:
$ nasm -felf test.asm
$ gcc -o test test.o
$ valgrind ./test

---------- test.asm -----------
section .text
global main

main:
	enter 0, 0
	leave
	ret
-------------------------------

This is Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=393235
Comment 1 Julian Seward 2011-10-12 10:24:09 UTC
Why should we add support for an instruction that nobody uses?