[Mesa-dev] [Bug 91039] [d3d9] D3D9 state tracker crashes due to stack misalignment if Mesa is compiled with -mfpmath=sse

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jun 20 12:06:20 PDT 2015


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

            Bug ID: 91039
           Summary: [d3d9] D3D9 state tracker crashes due to stack
                    misalignment if Mesa is compiled with -mfpmath=sse
           Product: Mesa
           Version: 10.6
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: mesa-dev at lists.freedesktop.org
          Reporter: xamaniqinqu at gmail.com
        QA Contact: mesa-dev at lists.freedesktop.org

Description: 
The "Nine" D3D9 state tracker crashes when Wine loads any D3D program if Mesa
is compiled with -mfpmath=sse. This is because the Linux ABI assumes a stack
alignment to 16 bytes, whereas the Win32 ABI assumes a stack alignment to 4
bytes. This causes a stack misalignment and thus a general protection fault.


Additional information: 
Also see the following external bug reports:

https://bugs.winehq.org/show_bug.cgi?id=22475
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40838


Specifications:
OS: Gentoo GNU/Linux x86_64
Kernel version: Linux 4.0.4-hardened-r3
Mesa version: 10.6.0


Solution:
The crashes no longer occur when Mesa's stack is realigned to 4 bytes.
Therefore, always pass -mstackrealign to CFLAGS if -mfpmath=sse is enabled;
this should probably be handled in the configure script.

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


More information about the mesa-dev mailing list