https://bugs.winehq.org/show_bug.cgi?id=29384
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |michael@fds-team.de
--- Comment #37 from Michael Müller michael@fds-team.de --- Created attachment 49657 --> https://bugs.winehq.org/attachment.cgi?id=49657 ntdll: Change WRITECOPY memory protection to WRITE on first write access
Hi,
I wrote a patch which correctly changes the WRITECOPY memory protection to WRITE when the first write occurs on a page. To achieve this every page with WRITECOPY protection does not really gain write permission, so that a segfault occurs on the first write access. The signal handler will now detect this case, change the protection to WRITE and will continue the execution of the program. This fixes Voobly and the according wine tests which were marked as todo.
The only downside of this patch is that Wine installs the signal handler quite late as it expects a connection to the wine server. This is not sufficient for our case since Wine also uses WRITECOPY for it's internal dlls leading to a crash. In order to overcome this problem, I setup a temporarily signal handler when Wine is done with setting up the virtual memory management. Currently the patch only contains such a signal handler for i386 so that this patch will only affect 32 bit software.
Regards, Michael