[Mesa-dev] [Bug 86788] (bisected) 32bit UrbanTerror 4.1 timedemo sse4.1 segfault...

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Nov 28 03:45:30 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=86788

--- Comment #7 from José Fonseca <jfonseca at vmware.com> ---
This patch might help:

diff --git a/src/mesa/main/sse_minmax.c b/src/mesa/main/sse_minmax.c
index 222ac14..c3ec420 100644
--- a/src/mesa/main/sse_minmax.c
+++ b/src/mesa/main/sse_minmax.c
@@ -31,6 +31,9 @@
 #include <stdint.h>

 void
+#if !defined(__x86_64__)
+__attribute__((force_align_arg_pointer))
+#endif
 _mesa_uint_array_min_max(const unsigned *ui_indices, unsigned *min_index,
                          unsigned *max_index, const unsigned count)
 {


See
https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-g_t_0040code_007bforce_005falign_005farg_005fpointer_007d-attribute-3040
for more info.

But this is still not safe, because gcc might still use msse behind our backs.
We really must modify configure.ac and Makefiles to use -mstackrealign
-mincoming-stack-boundary=2 whenever we use -msse* on x86 platforms. (x86_64 is
not necessary)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20141128/140008ad/attachment.html>


More information about the mesa-dev mailing list