[Pkg-sdl-commits] [SCM] Debian packaging of SDL_gfx branch, master, updated. debian/2.0.23-2-3-g4ca034e

Felix Geyer fgeyer at debian.org
Fri Aug 3 17:04:04 UTC 2012


The following commit has been merged in the master branch:
commit bfb134bdb27e461e6c344d7c93eb42f0e64c771c
Author: Felix Geyer <debfx-pkg at fobos.de>
Date:   Fri Aug 3 17:32:17 2012 +0200

    Fix mmx cpuid detection.
    
    Closes: #663514, LP: #1029981.

diff --git a/debian/changelog b/debian/changelog
index 42e3711..e9bb5b5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+sdlgfx (2.0.23-2) unstable; urgency=high
+
+  [ Steve Langasek ]
+  * High-urgency upload for RC bugfix.
+  * debian/patches/wrong_cpuid_mmx_detection.diff: fix mmx cpuid
+    detection.  Closes: #663514, LP: #1029981.
+
+ -- Felix Geyer <debfx-pkg at fobos.de>  Fri, 03 Aug 2012 17:28:49 +0200
+
 sdlgfx (2.0.23-1) unstable; urgency=low
 
   [ Felix Geyer ]
diff --git a/debian/patches/series b/debian/patches/series
index b368690..079fcba 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 010_primitives_spell.diff
+wrong_cpuid_mmx_detection.diff
diff --git a/debian/patches/wrong_cpuid_mmx_detection.diff b/debian/patches/wrong_cpuid_mmx_detection.diff
new file mode 100644
index 0000000..8cc5f0a
--- /dev/null
+++ b/debian/patches/wrong_cpuid_mmx_detection.diff
@@ -0,0 +1,35 @@
+Description: fix mmx cpuid detection
+ The MMX detection in SDL_imageFilter.c contains buggy assembly which reads
+ garbage values off the stack.  This usually results in MMX not being used
+ on i386; sometimes it instead causes the test suite to fail.  At runtime it
+ could also cause MMX instructions to be used on non-MMX machines.
+ .
+ Replace this cpu detection code with code that doesn't rely on the stack
+ pointer staying the same after popa.
+Author: Steve Langasek <steve.langasek at canonical.com>
+Bug: http://sourceforge.net/support/tracker.php?aid=3550046
+Bug-Debian: http://bugs.debian.org/663514
+Bug-Ubuntu: https://launchpad.net/bugs/1029981
+
+Index: sdlgfx-2.0.23/SDL_imageFilter.c
+===================================================================
+--- sdlgfx-2.0.23.orig/SDL_imageFilter.c
++++ sdlgfx-2.0.23/SDL_imageFilter.c
+@@ -80,12 +80,12 @@
+ 			popa
+ 	}
+ #else
+-	asm volatile ("pusha		     \n\t" "mov    %1, %%eax     \n\t"	/* request feature flag */
++	asm volatile ("pusha		     \n\t" "mov    %0, %%eax     \n\t"	/* request feature flag */
+ 		"cpuid                \n\t"	/* get CPU ID flag */
+-		"mov    %%edx, %0     \n\t"	/* move result to mmx_bit */
+-		"popa		     \n\t":"=m" (flags)	/* %0 */
+-		:"i"(0x00000001)	/* %1 */
+-		);
++		"mov    %%edx, 0(%1)  \n\t"	/* move result to mmx_bit */
++		"popa		     \n\t":
++		:"i"(0x00000001), "S"(&flags)	/* %0, %1 */
++		: "memory");
+ #endif
+ #endif
+ 

-- 
Debian packaging of SDL_gfx



More information about the pkg-sdl-commits mailing list