On Mon Dec 23 05:20:01 2024 +0000, William Horvath wrote:
changed this line in [version 5 of the diff](/wine/wine/-/merge_requests/7064/diffs?diff_id=150040&start_sha=f139c28c51980f6b1aef9f24a0d261e738d4f8a5#253a5ed0bf568582a6c96df257e6e01fe7220931_2138_2131)
If I'm understanding what you meant here, you suggest we should only be performing the GS base fixup in the WoW64 layer's code instead of on the Unix side. Let me know if I'm still not clear about that.
Besides not being able to make this work (without a consequent seh `ACCESS_VIOLATION`), I can't find a reason as to why this is better/safer/more correct than fixing up at the earliest moment (Unix-side, syscall_dispatcher fault) instead of letting the issue propagate.
It seems safe enough to fix up the GS base address based on what we get from e.g. `ARCH_GET_GS` and `NtCurrentTeb()`, along with the other checks.
Also, while I haven't tried those patches on macOS, it fortunately seems like it's not quite necessary here in the scenarios I've looked at.