Package: ogre-1.8
Version: 1.8.0-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu quantal ubuntu-patch

In Ubuntu, the attached patch was applied to achieve the following:

  * remove-alignment-hack.patch: (LP: #1041934)
    Drop obsolete stack alignment hack that breaks with gcc-4.7
    Thanks to Kai Mast for the report and patch.

https://bugs.launchpad.net/ubuntu/+source/ogre-1.8/+bug/1041934

The same stack alignment hack was also removed in fftw3 3.3.2 for the
same reason.
The issue is also fixed in ogre 1.8.1:
http://www.ogre3d.org/2012/09/02/ogre-1-8-1-byatis-released
"Replace an ugly hack for GCC that was trying to force 16-byte stack
alignment in OgreOptimisedUtilSSE, but causes trouble with recent GCC
versions"

To reproduce the issue run the SampleBrowser and select the "Character"-Demo.

I could not reproduce it in debian wheezy with brief testing, but the
issue is real and can be reproduced easily on ubuntu quantal and several
other platforms, there might well be cases where Debian is affected too.

Thanks for considering the patch.
diff -Nru ogre-1.8-1.8.0/debian/changelog ogre-1.8-1.8.0/debian/changelog
diff -Nru ogre-1.8-1.8.0/debian/patches/remove-alignment-hack.patch ogre-1.8-1.8.0/debian/patches/remove-alignment-hack.patch
--- ogre-1.8-1.8.0/debian/patches/remove-alignment-hack.patch	1970-01-01 01:00:00.000000000 +0100
+++ ogre-1.8-1.8.0/debian/patches/remove-alignment-hack.patch	2012-09-08 13:37:43.000000000 +0200
@@ -0,0 +1,16 @@
+Description: drop stack alignment hack that breaks with gcc-4.7
+Bug: http://www.ogre3d.org/mantis/view.php?id=553
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ogre-1.8/+bug/1041934
+Applied-Upstream: 1.8.1
+
+--- a/OgreMain/src/OgreSIMDHelper.h
++++ b/OgreMain/src/OgreSIMDHelper.h
+@@ -48,7 +48,7 @@
+ // thing. The size of the allocated block seems to be irrelevant.
+ #define __OGRE_SIMD_ALIGN_STACK()   _alloca(16)
+ 
+-#elif OGRE_CPU == OGRE_CPU_X86 && (OGRE_COMPILER == OGRE_COMPILER_GNUC || OGRE_COMPILER == OGRE_COMPILER_CLANG)
++#elif OGRE_CPU == OGRE_CPU_X86 && OGRE_COMPILER == OGRE_COMPILER_CLANG
+ //
+ // Horrible hack to align the stack to a 16-bytes boundary for gcc.
+ //
diff -Nru ogre-1.8-1.8.0/debian/patches/series ogre-1.8-1.8.0/debian/patches/series
--- ogre-1.8-1.8.0/debian/patches/series	2012-06-06 19:32:04.000000000 +0200
+++ ogre-1.8-1.8.0/debian/patches/series	2012-09-08 13:34:57.000000000 +0200
@@ -1,3 +1,4 @@
 change_sample_cfg_path.patch
 # mafm for 1.8.0-1: Disable, seems to be fixed upstream
 #fix_bug_613924-ftbfs_armel.diff
+remove-alignment-hack.patch

Reply via email to