[Bug 943] Regression in module loading
Wine Bugs
wine-bugs at winehq.com
Sat Jun 21 06:55:02 CDT 2003
http://bugs.winehq.com/show_bug.cgi?id=943
------- Additional Comments From z_god at wanadoo.nl 2003-21-06 06:55 -------
Bug comments restored from Gmane.org:
A recent change in CVS caused Xnews (<http://xnews.newsguy.com/>) to crash on
startup.
I've traced it to the patch
<http://cvs.winehq.com/patch.py?id=1027987166850574216879071>,
but I know next to
nothing about this how this part of the code works.
The crash happens on the following code in PE_InitTls, loader/pe_image.c:
if ( wm->tlsindex == -1 ) {
LPDWORD xaddr;
wm->tlsindex = TlsAlloc();
xaddr = _fixup_address(&(peh->OptionalHeader),delta,
pdir->AddressOfIndex
);
=> *xaddr=wm->tlsindex;
}
wm is the module Xnews.exe itself. xaddr and wm are both reasonable addresses, but
the
problem is that *xaddr was previously marked read-only using VIRTUAL_SetProt in
map_image, memory/virtual.c. If I change it so that
VPROT_WRITE|VPROT_WRITECOPY
is always included again, it fixes this crash, but then the app dies soon after:
Wine-dbg>bt
Backtrace:
=>0 0x38a2389c (_end+0x309d6174) (ebp=405c6e8c)
1 0x400ac108 (start_process+0x258 [process.c:526] in libntdll.dll.so) (ebp=405c6f38
2 0x400b00d7 (call_on_thread_stack+0x23(func=0x400abeb0) [sysdeps.c:105] in
(libnt.dll.so) (ebp=405c6ff4)
3 0x400b0270 (SYSDEPS_CallOnStack+0x14 in libnt.dll.so) (ebp=00000000)
Wine-dbg>up
526 ExitThread( entry(NULL) );
Wine-dbg>p entry
0x4045918c
According to -debugmsg +module, Xnews.exe was mapped to
0x4036b000-0x404aa000, so I
don't know where the 0x38... address came from. Backing out the above patch fixes
the
problem completely. Other apps don't seem to be affected, and I don't know what's
special
about this one.
------- Additional Comments From julliard <at> winehq.com 2002-08-06 18:55 -------
Should be fixed now. Thanks for the good report.
------- Additional Comments From prupe <at> myrealbox.com 2002-08-06 20:47 -------
Fixed by Alexandre Julliard in memory/virtual.c 1.83
------- Additional Comments From tony_lambregts <at> telusplanet.net 2003-03-26
15:26 -------
Closing
--
Configure bugmail: http://bugs.winehq.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the wine-bugs
mailing list