Unhandled Page fault on write access - Wine 4.4 - NetBSD i386

zerous zerous at nocebo.space
Mon Jun 3 11:15:18 CDT 2019


Hi,

Wine-4.4 throws Unhandled Page fault on write access errors on NetBSD
i386 -current. I did some debugging and found that it was due to
_lwp_makecontext(3) segfaulting as it tried to access memory that was
out-of-bounds. However, the real reason was pthread_attr_setstack(3)
setting up a guard of 65536 bytes which Wine didn't account for. I am
aware that the manpage of pthread_attr_setstack(3) is dated and it
states that no default guard will be allocated. I will indeed send a
patch to amend that. In order to work around the issue, I have tried
setting the guard to 0 explicitly using
pthread_attr_setguardsize(3). As far as I know this change shouldn't
affect any other platforms. Additionally, it also solves the initial
problem I had, which was wine giving me black windows instead of the
UI; an inadvertent side-effect of the same issue.


OK?
-- 
zerous
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-Unhandled-page-fault-on-write-access.patch
Type: text/x-diff
Size: 1179 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20190603/2c651a42/attachment.patch>


More information about the wine-devel mailing list