Dear Maintainer, When running Wine on arm64, on HW with pointer authentication (armv8.3 and newer), Wine fails to run. In some cases, it hangs directly on startup for any case (e.g. "wine wineboot" hangs), in some cases it seemingly runs successfully, but any case that requires unwinding in the user executables fail. (Exactly what makes it seemingly succeed in some cases and hang in others is unclear.) The issue can be consistently observed by running "WINEDEBUG=+seh wine wineboot" in a fresh install with no preexisting wine prefix (~/.wine). On older hardware, without support for pointer authentication, Wine starts up nicely (and there are a handful of debug printouts about unwinding one exception). On newer hardware, it results in repeated printouts about EXCEPTION_ILLEGAL_INSTRUCTION. The root cause of this issue is that Clang 19 and newer has regressed the code generation for return address signing on Windows on aarch64 - this issue has been filed upstream at [1]. Debian builds of Wine have pointer authentication enabled for the internal PE components of Wine (and those components are compiled with Clang), which causes Wine to trip over itself when unwinding through those components. However, the issue is made visible due to the fact that Wine's unwinding of pointer authentication was more strict than what really is necessary. A fix for this was merged in [2]. This fix avoids triggering illegal instructions and breaking on these cases. This fix will be in the upcoming development release Wine 11.12, but it also applies cleanly on e.g. Wine 10.0. Applying this patch in the Debian packaging will likely fix this issue. [1] https://github.com/llvm/llvm-project/issues/203852 [2] https://gitlab.winehq.org/wine/wine/-/commit/a83427f29e925d8b29cf58a55406d28bd95750a2
Hi Martin, [...] On systems with FEAT_FPAC support, indeed I could reproduce the behavior you mentioned: EXCEPTION_ILLEGAL_INSTRUCTION printed out repeatedly, immediate failure. On systems with pointer authentication but without FEAT_FPAC, the issue is more subtle: things seem to more or less work, but explorer.exe maxes out one CPU core. Also, running simple stuff like `wine cmd` does not really work. I built a local version of wine with your patch, and it does seem to fix the issue for systems without FEAT_FPAC. I don't see explorer.exe maxing out cores, and `wine cmd` works fine. However, on systems with FEAT_FPAC I still get illegal instructions. The general difference between the two is that with FEAT_FPAC, the autiasp (or equivalent) instruction fails with a SIGILL when failing to validate the value stored in LR. Without FEAT_FPAC, the autiasp instruction itself does not cause an exception, but instead it leaves a faulting value in LR. The crash then occurs when that corrupted value is next used. See https://wiki.debian.org/ToolChain/PACBTI#PAC-1. Here's the SIGILL with your patch: $ WINEDEBUG=+seh gdb /usr/lib/aarch64-linux-gnu/wine/wine [...] (gdb) run wineboot [...] wine_dbg_output: debugstr buffer overflow (contents: '002c:trace:seh:dispatch_exception code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D76230 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c000001d (EXCEPTION_ILLEGAL_INSTRUCTION) flags=0 addr=0000FFFFF7D763F0 code=c00000fd (EXCEPTION_STACK_OVERFLOW) flags=0 addr=00006FFFFFD567C4 ') 002c:err:virtual:virtual_setup_exception nested exception on signal stack addr 0xfffff7e7b5bc stack 0x7ffce130 Program received signal SIGILL, Illegal instruction. 0x0000fffff7d76230 in __wine_syscall_dispatcher () from /usr/lib/aarch64-linux-gnu/wine/aarch64-unix/ntdll.so For anyone who wants to follow along and build a patched wine, the version currently in sid (10.0~repack-12) does not build for several reasons. First you have to install a bunch of unicode-related packages from stable due to https://bugs.debian.org/1125336 # apt install unicode-data=15.1.0-1 unicode-idna=16.0.0-1 unicode-cldr-core=46-0.1 Then the make_vulkan bits fail due to the XML files shipped by libvulkan being too new. Again installing stuff from stable helps: # apt install libvulkan-dev=1.4.309.0-1 libvulkan1=1.4.309.0-1 The patch disable/duplicate-nls.patch does not seem to apply, I've commented it out in debian/patch/series. Then later the build fails due to NLS files not being installed anywhere. Out of time, I just added the following to debian/wine-common.install to carry on with the build: usr/* usr/share/wine/nls
Hi Emanuele, Thanks for testing and looking into this, I appreciate it a lot! This issue here can also be observed by trying to run a test app that does unwinding. E.g. https://martin.st/temp/hello-exception-aarch64.exe is a build of https://github.com/mstorsjo/llvm-mingw/blob/master/test/hello-exception.cpp, built with an llvm-mingw toolchain. This program fails when throwing a C++ exception, if Wine is built with CROSSCFLAGS="-mbranch-protection=standard", like it is in the Debian packages. But anyway, this part is fixed by the previously referenced patch. Thanks for these hints for how to fix rebuilding it! Yeah due to troubles with rebuilding the Debian package I didn't get to testing the final fix in the full context. With these hints, I was able to rebuild the package on Debian sid nicely, and reproduce the remaining problem. Actually, it turns out that this second issue isn't related to PAC or FPAC at all - but related to BTI. This issue is actually fixed in latest upstream Wine already, in [1]. Unfortunately, this fix doesn't apply cleanly on Wine 10.0, but it's easy enough to backport. I tested a backport of it, which I pushed at [2]. With these fixes, the packages now run fine on both a Cortex A720, and on Neoverse V2 (Graviton 4), where I previously hit the immediate EXCEPTION_ILLEGAL_INSTRUCTION. [1] https://gitlab.winehq.org/wine/wine/-/commit/da0b77340302d90b6b11ef030a8861fdfe728f48 [2] https://gitlab.winehq.org/mstorsjo/wine/-/commit/64c22e090351fd37c6b4f38ce5235d4c9c1bdaa2 // Martin
Hello Martin, systems with PAC support enabled: https://gitlab.winehq.org/wine/wine/-/commit/a83427f29e925d8b29cf58a55406d28bd95750a2 And the following addresses BTI: https://gitlab.winehq.org/mstorsjo/wine/-/commit/64c22e090351fd37c6b4f38ce5235d4c9c1bdaa2
Dear maintainer, I've prepared an NMU for wine (versioned as 10.0~repack-12.1) and uploaded it to DELAYED/14. Please feel free to tell me if I should cancel it. Regards.
We believe that the bug you reported is fixed in the latest version of
wine, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 1140177@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Boyuan Yang <byang@debian.org> (supplier of updated wine package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Sun, 15 Nov 2026 12:00:11 -0500
Source: wine
Architecture: source
Version: 10.0~repack-12.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Wine Party <debian-wine@lists.debian.org>
Changed-By: Boyuan Yang <byang@debian.org>
Closes: 1121773 1125336 1127141 1127144 1127544 1139260 1140177 1146075
Changes:
wine (10.0~repack-12.1) unstable; urgency=medium
.
* Non-maintainer upload.
* debian/copyright: Align Files-Excluded with the existing orig tarball,
retaining generated cursors and bitmaps rebuilt from their SVG inputs.
* debian/libwineVERSION.lintian-overrides: Drop three obsolete tags and
their associated comments.
* debian/scripts/wineserver.in: Select the server for the existing prefix
architecture or explicit WINEARCH before falling back by availability.
Rely on the existing server default for persistence.
* debian/README.Debian: Clarify ARM32 runtime requirements and the
prefix-aware public wineserver command.
* debian/patches: Use Wine's official development repository for
Applied-Upstream references.
+ fixes/arm64-unwind-pac.patch: Backport compatibility with return
address signing in ARM64 PE binaries built with recent Clang.
(Closes: #1140177).
+ fixes/arm64-bti-dispatchers.patch: Backport BTI landing pads for
ARM64 call dispatchers to avoid illegal instructions on BTI CPUs.
+ generate/vulkan-win32-order.patch: Order converted structures by
their canonical dependencies, including aliases.
+ generate/vulkan-native-union-selector.patch: Pass union selectors
to native conversions for current Vulkan registry data.
+ fixes/winebuild-const.patch: Backport const-correct string parsing
for current glibc and GCC 16.
+ fixes/ntdll-const.patch, fixes/winex11-const.patch,
fixes/unixlib-const.patch: Backport the matching C23/glibc const
correctness and wide-character macro fixes.
- debianization/manpage-server.patch: Drop the private-only command
documentation now that the public wineserver launcher is restored.
+ generate/unicode-17.patch: Backport support for Unicode 17 line
breaking classes (Closes: #1125336).
+ generate/cldr-48.patch: Adapt locale data generation to CLDR 48.
+ generate/vulkan-funcpointer.patch: Support the Vulkan 1.4.339
function pointer XML schema (Closes: #1127544).
* debian/control.in: Use Unicode 17 and CLDR 48.
* debian/control.in, debian/control.stable.in: Use dh-sequence-builtusing
to record Unicode data source versions for libwine and wine-common.
* debian/control.in, debian/rules: Drop libcapi20-dev and disable
obsolete ISDN support (Closes: #1146075).
* debian/libwineVERSION.prerm: Preserve shared alternatives when
another architecture remains installed (Closes: #1121773).
* debian/wine32VERSION.links, debian/wine64VERSION.links: Restore the
private loader and wineserver compatibility paths (Closes: #1127141,
#1127144).
* debian/wine64VERSION.links: Route the legacy wine64 entry through the
launcher so the native loader receives its installed executable name.
* debian/scripts/wineserver.in, debian/rules, debian/wineVERSION.install,
debian/libwineVERSION.postinst: Restore the public wineserver launcher
and its alternatives entry (Closes: #1139260).
* debian/NEWS: Document the restored public wineserver, prefix-aware
server selection and ARM32 runtime requirements.
* debian/control.in: Update Standards-Version to 4.7.4, remove
obsolete Priority and Rules-Requires-Root fields, and use the
repository URL without a branch selector.
Checksums-Sha1:
248e59f58f43d906b107bb84e2de4f935290a4a4 3883 wine_10.0~repack-12.1.dsc
be20359bb3c8e7585620608dd1f218c6e3a4229e 6224860 wine_10.0~repack-12.1.debian.tar.xz
55f6a050427d3a3b097a5d612251416231481bb4 8882 wine_10.0~repack-12.1_source.buildinfo
Checksums-Sha256:
3405dcf1000b63bc9dc1b7ad53e310bd18716551b5f3e634776787b25e9846bd 3883 wine_10.0~repack-12.1.dsc
1da73e2199a1244b09c07cb278ac2d920b63f78ea53e22dddad650aaccac3053 6224860 wine_10.0~repack-12.1.debian.tar.xz
4086361ce3dfe5bb6cd1d2974168269b96ff98a18e4224aa5a06c0f409ab97a5 8882 wine_10.0~repack-12.1_source.buildinfo
Files:
fac7dcb28d7f955a7ad964b75dcd9a26 3883 otherosfs optional wine_10.0~repack-12.1.dsc
7d1d868d2ec75b91b0fcb980b9b11d98 6224860 otherosfs optional wine_10.0~repack-12.1.debian.tar.xz
ec53f27d2b64075282442301001dd4cf 8882 otherosfs optional wine_10.0~repack-12.1_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEfncpR22H1vEdkazLwpPntGGCWs4FAmr56G0ACgkQwpPntGGC
Ws6N0A//axaBeuJl9djTpqvxWApmK1wNgZcQtlBXeL1KyNoyh+LatomCSP/W4M8a
H49Lyth898xMpW8mbZM7J+WfqRj+62/sBtwvRS0s5HfOkfxwyRqbFST21kKwHriE
f6nQWioIV8qmaOaQlXM2GDc69gyRGjIOa/pJfdFDnEitmg7vGXdEIPOClnbgWf3p
nchJ8sEwFkhZBVFCxUNQO8Qw/Q+r+MaT9XB2/lozS7Uustv67U5LZTi8GUKgo/+a
d4N8XZn1a5kePGu03OGgwpMrvqjIaekXBxda2jYyt5sxoyBWpOdUxSAQIO5jjGtV
LhgCh1PXHDI0Vn+mXmtFd6iEtWuRX7YsF7uw0Nauj7VKwkYslBxZgL2psQREMJhX
+tcjirYX5s6Hootsi9KrQxaHJt2aVxD+v2tAeGIuswLYXSm4rFptf8kJ0TlIkeqK
HEyuHF3sB1o3PSH0SJa0xMXkqyyJ7odsbgTScJWEUTvcDLIiKoOvCL/BiiWn2/WU
GvWsz2ZLNHpgX8sVYtXBoF5eVXeQt1JQiIbobbpoahIRL8k0nagwuVSz//DBuT1s
7zf6TzsQRYc27i10YjmGaestYdRZwec/3wut/8ehsH49JUTGhOUXw5TNhzOWgcjK
g3U/kbAUY8tBtwWK+hp+f8wit6FdP1UWu5s8GKNfq9l2FdDyYLk=
=0MWq
-----END PGP SIGNATURE-----