dxvk: System compiled dxvk causes stack smashing with wine when playing yakuza-0/kiwami.
Tried playing yakuza-0 / yakuza-kiwami. Both work with wine on its own; its just when I install dxvk they don’t even start and show an error message.
0120:err:seh:NtRaiseException Unhandled exception code c0000409 flags 1 addr 0x7ffffd5255c2
distribution: Gentoo Linux gpu: RTX 4080 SUPER gpu driver: proprietary nvidia drivers version 550.78 wine version: wine-vanilla-9.7 dxvk version: 2.3.1-r1 vulkan-loader version: 1.3.280.0
I have tried enabling the environment variables below but they didn’t give me anything for some reason.
VK_INSTANCE_LAYERS="VK_LAYER_KHRONOS_validation"
DXVK_LOG_LEVEL="debug"
DXVK_LOG_PATH="/home/user/"
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (6 by maintainers)
Damn it! What an insidious issue! I’ve wasted whole bunch of time and effort while thinking that my “unsafe” Gentoo configuration (clang/libc++ with
-D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -O3 -march=x86-64-v2 -mtune=native -mavx -mf16c -mcrc32 -maes -mpclmul -flto=thin -Wl,--plugin-opt=O3 -fcoroutines -fpermissive -mllvm -polly -mllvm -polly-vectorizer=stripmine -mllvm -polly-parallel -mllvm -polly-omp-backend=LLVM -lgomp -fwhole-program-vtables -Wl,--gc-sections -Wl,--icf=safe -rtlib=compiler-rt -unwindlib=libunwind -Wl,-lunwindand some other stuff) was at fault. Yet it was the exact opposite: bloated mess of a dev-util/mingw64-toolchain is the culprit - the one place Gentoo should have and failed to put filtering for-fstack-protector-strong -fstack-clash-protection.With filtering those it works just fine. In fact, I’ve rebuilt wine & dxvk in the exact opposite manner: removed all filtering (LTO, AVX, etc.) and hardcoding for wine & dxvk, patched wine with NTSYNC and staging, rebuilt wine/wow64 with clang. I’ve also tried adding
-mstackrealign -mpreferred-stack-boundary=5 -mprefer-vector-width=256 -mavx256-split-unaligned-load -mavx256-split-unaligned-storeto dxvk to workaround avx issue but not sure if it actually applied to mingw. Cyberpunk 2077 still loaded just fine.@doitsujin dxvk and vkd3d-proton now are the only users of bloated mess of mingw64-toolchain and also its victims. Could it be possible to drop this dependency and use clang, just like wine does?
Gentoo here, while we do default to
-fstack-protector-strongsystem-wide, the default mingw toolchain we provide does not (prefer to avoid most security features given how fragile Wine can be, Edit: the implementation of the features themselves can also be like how gcc+mingw crashed with-fstack-clash-protectionfor a while). I believe any users affected by this is either passing-fstack-protector-strongor similar themselves in*FLAGSor using a different toolchain that does default-ssp (e.g. with crossdev tooling in gentoo)Does indicate there may be something wrong with either dxvk or mingw64-runtime, but to have a shot at reproducing would need to build both with it (haven’t tried, Edit: and I assume the binaries here do not already).
If really needed, Gentoo could work around this by forcing explicit
-fno-stack-protectorin the runtime+dxvk ebuilds (ignoring user settings) though.Without a log, best guess would be that you probably mixed up system32 and syswow64 when installing
Also you should probably know that Yakuza 0 needs esync to reliably save: https://github.com/ValveSoftware/Proton/issues/492#issuecomment-889240630