Sophie

Sophie

distrib > Mageia > 9 > x86_64 > by-pkgid > bc927d5d97a780ccccc99eec41f4fc91 > files > 2

libx86-1.1-40.mga9.src.rpm

http://cgit.freedesktop.org/~vignatti/libx86/commit/src/lrmi/backend-x86emu.c?id=b327015cf23f
http://ref.x86asm.net/coder32.html#xF4
http://pdos.csail.mit.edu/6.828/2010/readings/i386/HLT.htm

HLT is 0xf4 and not 0x4f

Spotted by Thierry Vignaud


--- libx86-1.1/thunk.c.orig	2015-05-20 01:45:50.000000000 +0200
+++ libx86-1.1/thunk.c	2015-05-20 01:46:11.000000000 +0200
@@ -179,7 +179,7 @@
 	X86_ESP = 0xFFF9;
 	memset (stack, 0, 64*1024);
 
-	*mmap_addr = 0x4f; /* Make sure that we end up jumping back to a
+	*mmap_addr = 0xf4; /* Make sure that we end up jumping back to a
 			      halt instruction */
 
 	M.mem_base = (unsigned long)mmap_addr;