Bug in PE_LoadImage/map_image? [Was: VirtualProtect and app crash]

Robert Baruch autophile at starband.net
Thu Dec 13 14:32:48 CST 2001


Andreas:

 > No, you're entirely correct.
 > Wine doesn't properly set memory protections of the executable file
 > in the loader yet.
 > IMHO this is a pretty damn grave omission.
 > I'd be rather happy if you actually fixed that :-)
 > (I once had another program which stumbled on this)

OK, I'm working on a patch to the current CVS. Once I test it against a 
few executables, I'll submit it to wine-patches. I tested it against 
20011108 with no problems, and this time the app throws a protection 
violation where it's supposed to. It still doesn't solve the main 
problem, but it's a step in the right direction, I hope!

Gerard:

 > What about
 > http://www.winehq.com/hypermail/wine-patches/2001/11/0123.html

No, that sets the original mmap to read-only. After you create the view 
of the mmap (as read-only!) you have to go through each section in the 
image, look at its protections, and modify the view of the mmap to 
correspond to those protections.

--Rob






More information about the wine-users mailing list