[Bug 53157] New: --without-mingw builds on Mac can't unwind exceptions

WineHQ Bugzilla wine-bugs at winehq.org
Tue Jun 14 12:50:24 CDT 2022


https://bugs.winehq.org/show_bug.cgi?id=53157

            Bug ID: 53157
           Summary: --without-mingw builds on Mac can't unwind exceptions
           Product: Wine
           Version: 7.10
          Hardware: x86-64
                OS: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ntdll
          Assignee: wine-bugs at winehq.org
          Reporter: stefan at codeweavers.com

I am trying to get a non-mingw build on MacOS to run my games to get debug
symbols for Wine DLLs in Instruments for performance profiling. One of the
issues I ran into is that SEH exceptions thrown in the PE side of our code
can't be handled. Wine runs into further nested exceptions trying to unwind the
stack and crashes.

This is a regression introduced by the following commit:

264bd4fc84020f217807f1e59d3bfa9302e5110c is the first bad commit
commit 264bd4fc84020f217807f1e59d3bfa9302e5110c
Author: Martin Storsjo <martin at martin.st>
Date:   Fri May 29 13:51:04 2020 +0300

    wine/asm.h: Don't define __ASM_CFI when using clang as cross compiler.

Reverting this commit on top of Wine 7.10 fixes this particular problem.

Getting a Wine build like this is a bit tricky. clang does not support
-mabi=ms, and gcc can't build winemac.drv because of Apple-isms in the system
headers that Apple never upstreamed to FSF gcc. (But they did have it in their
own gcc before they switched to clang).

To get a non-mingw gcc'ish Wine I do roughly the following:

1) Use wine-7.10, not master, there is yet another regression since then
2) Install gcc-11 with homebrew
3) ~/wine/configure --enable-win64 --without-x --without-mingw --disable-tests
CC=gcc-11
4) Build the thing
5) Edit Makefile, replace CC = gcc-11 with CC = clang
6) cd into dlls/winemac.drv, run make
7) optionally do the same in dlls/winecoreaudio.drv
8) optionally undo the Makefile changes if you plan to recompile e.g. ntdll

The game in question is Rocket League; That adds extra troubles with Steam (32
bit, so needs Mojave). I think the problem is independent of Rocket League
though. The exception causing the crash is OutputDebugStringA. I don't think
the problem is specific to this game though.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list