http://bugs.winehq.com/show_bug.cgi?id=890
------- Additional Comments From z_god@wanadoo.nl 2003-20-06 08:08 ------- Bug comments from Gmane.org:
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 :-)
------- Additional Comments From maxx2 <at> veneto.com 2002-07-18 03:09 ------- Created an attachment (id=232) --> (http://bugs.winehq.com/attachment.cgi?id=232&action=view) C++ Test app for bug 890
------- Additional Comments From maxx2 <at> veneto.com 2002-07-19 14:42 ------- Just submitted a Patch on wine-patches that seems to solve the problem.