https://bugs.winehq.org/show_bug.cgi?id=43516
Bug ID: 43516 Summary: GCC march=native Flag Causes "Unhandled Pagefault on Write" Product: Wine Version: 2.14 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ben@xnode.org Distribution: ---
I've run into a specific crash that only happens with using the "-march=native" GCC flag at build time (usage of -O3 or -O2 don't affect it). Removing "march" entirely stops the crash from occurring.
This is on a Intel Broadwell i7-5775C using GCC 7.1.1.
Triggering the crash is unfortunately a bit specific: The crash occurs when loading Mario Kart 8 in CEmu (1.8) under a 64bit Wine prefix. The exact moment it happens is once the game's splash screen appears - pressing A should then take you to the menu, but instead if Wine has been built with march=native, it'll throw an Unhandled Pagefault at this point instead:
"wine: Unhandled page fault on write access to 0x7f7fda6f0080 at address 0x1400e1867 (thread 005f), starting debugger..."
According to GCC, the flags it activates when using march=native on this platform are: -march=broadwell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrtm -mhle -mrdrnd -mf16c -mfsgsbase -mrdseed -mprfchw -madx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=broadwell -fPIE -fstack-check=specific -fstack-protector-strong (in case any of those stand out as being an issue when used with Wine)