From 7a9b8deeca5c8c5ccf7bb4656b01893b0913f4e7 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Tue, 17 Jan 2012 11:35:03 +0000 Subject: [PATCH] x86: emulate lea with two register operands correctly An lea instruction with two register operands should raise an undefined instruction exception. Skype does such a instruction and will crash when starting if it does not get the exception. Signed-off-by: David Vrabel Signed-off-by: Keir Fraser Committed-by: Keir Fraser xen-unstable changeset: 24456:03781de56c31 xen-unstable date: Thu Jan 05 15:47:16 2012 +0000 --- xen/arch/x86/x86_emulate/x86_emulate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index 1e5c41bdd1..aa491f1de4 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -2056,6 +2056,7 @@ x86_emulate( } case 0x8d: /* lea */ + generate_exception_if(ea.type != OP_MEM, EXC_UD, -1); dst.val = ea.mem.off; break; -- 2.39.5