https://bugs.winehq.org/show_bug.cgi?id=29384
--- Comment #87 from Zhiyi Zhang zzhang@codeweavers.com --- (In reply to testator from comment #85)
I compiled wine-staging-9.6 with the userfaultfd patch again but this time with far less aggresive optimization flags, e.g no lto or -O3. It results in battle.net launching in staging-9.6 with userfaultfd to the same thing as vanilla wine
It's possible that wine compiled with LTO or -O3 can cause segfault. It's not a well-tested config. Wine doesn't officially support LTO. Also, there are some compilers in the past that have bugs even -Og so it's also possible with -O3. Anyway, your result suggests the userfaultfd patch is not at fault here.