Posted in bugzilla, I'll add the executable later on, and the patch... But it's not a 
solution, it's only make app believing the page has a different protection flag, 
doesn't correct the protection itself.... Should cause errors elsewhere.

Date sent:              Wed, 17 Jul 2002 19:45:36 -0600
From:                   Tony Lambregts <[EMAIL PROTECTED]>
To:                     [EMAIL PROTECTED]
Copies to:              [EMAIL PROTECTED]
Subject:                Re: Virtual Pages difference - Spotted with VirtualQuery()

> Max wrote:
> 
> >As usual, AutoCAD seems to be a good test-bench for wine :-)
> >I spotted the problem that seemed coming from VirtualQuety function, but
> >that is (I guess... hmmmm) more a problem of memory handling in wine.
> >
> >I made a little test app; here the results in wine and win2k, later on
> >the app itself :
> >
> >WINE RESULTS :
> >
> >Memory info about '004012F0' :
> >    Base Address             : 00401000
> >    Allocation Base  : 00400000
> >    Allocation Protect       : PAGE_READONLY | PAGE_WRITECOPY |              
> >                               PAGE_EXECUTE_READWRITE | PAGE_NOACCESS
> >    Region Size              : 00017000
> >    State                    : MEM_COMMIT
> >    Protect                  : PAGE_WRITECOPY      <----- HERE
> >    Type                     : MEM_PRIVATE
> >
> >WIN2k RESULTS :
> >
> >Memory info about '004012F0' :
> >    Base Address             : 00401000
> >    Allocation Base  : 00400000
> >    Allocation Protect       : PAGE_EXECUTE_WRITECOPY
> >    Region Size              : 00001000
> >    State                    : MEM_COMMIT
> >    Protect                  : PAGE_EXECUTE_READ    <---- AND HERE
> >    Type                     : MEM_IMAGE
> >
> >Well, dunno too much about Type field, I didn't find an app that check it yet;
> >I did find the app that uses Protect flag; I think it's poor coded, but as 
> >usual we should make bad apps work too :-)
> >The app put some data in code page, not yet spotted if hard or soft-coded,
> >then before reading it checks Protect field to see if it has not set the 
> >PAGE_GUARD, NO_ACCESS and WRITECOPY flags; if t has, it hangs some 10.000 
> >lines later (sigh....)
> >I think wine should set Protect flag quite as like as possible as windoze
> >
> >For AutoCAD2000 I put a dirty hack in process.c, but is really ugly; i'd 
> >prefer not to put my hands (bytes ?) too deeply inside some code that I don't 
> >understand completely... 
> >
> >Attached is the test source (compiled in Borland CBuilder, but should work 
> >with any compiler, apart some unuseful pragma's).
> >If needed I can post the compiled too :-)
> >
> >Regards
> >
> >Max
> >  
> >
> This is an excellent bug report but even if someone starts working on it 
> right away it would be nice to have this stuff in bugzilla. That 
> includes the exe and your (maybe not-so) ugly hack.
> 
> 
> Tony Lambregts
> 
> 



Reply via email to