[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    PE shared sections
From:       Peter Ganten <peter () ganten ! org>
Date:       2000-07-27 23:10:23
[Download RAW message or body]

Hello,

I am currently experimenting with shared sections of PE
files. I think the only possible way to implement them in WINE is to
create an anonymous file mapping and copy the contents of the shared
sections into this mapping. Attached you will find a patch, which
contains, what I have done so far. It's is not ready for submission to
wine-patches yet.

The patch works fine with some simple test application. It works also
with native dlls like shell32, comctl32 or comdlg32 (from
win95b). However, if a second program actually shares sections of
these libraries with the first program, it will crash during
initialization of the libraries, but only, if the second program is
not started with --debugmsg +snoop. A typical crash looks in winedbg
like this:

Unhandled exception: page fault on read access to 0x40cc00a0
 in 32-bit code (0xbfb7c55d).
In 32 bit mode.
0xbfb7c55d (COMCTL32.DLL.338+0x5c6): movl       0x0(%ecx),%esi
Wine-dbg>bt
Backtrace:
=>0 0xbfb7c55d (COMCTL32.DLL.338+0x5c6) (ebp=406d6da4)
  1 0xbfb7f25b (COMCTL32.DLL.EntryPoint+0x36) (ebp=406d6de0)
  2 0x400b602a (MODULE_InitDLL+0xa6(wm=0x403f25a4, type=0x1, lpReserved=0x1) \
[module.c:89]) (ebp=406d6e10)  3 0x400b6194 \
(MODULE_DllProcessAttach+0xdc(wm=0x403f25a4, lpReserved=0x1) [module.c:166]) \
(ebp=406d6e40)  4 0x400b616d (MODULE_DllProcessAttach+0xb5(wm=0x403f1f18, \
lpReserved=0x1) [module.c:161]) (ebp=406d6e70)  5 0x400b616d \
(MODULE_DllProcessAttach+0xb5(wm=0x403f1984, lpReserved=0x1) [module.c:161]) \
(ebp=406d6ea0)  6 0x4012e173 (start_process+0x29f [process.c:378]) (ebp=406d6f10)
  7 0x40131640 (SYSDEPS_DoCallOnStack+0x24(func=0x4012ded4, arg=0x0) [sysdeps.c:236]) \
(ebp=406d6ff0)  8 0x401316eb (SYSDEPS_CallOnStack+0x2f) (ebp=bffff89c)
  9 0x401317b9 (SYSDEPS_SwitchToThreadStack+0xb9(func=0x4012ded4) [sysdeps.c:306]) \
(ebp=bffff8dc)  10 0x4012e2cf (PROCESS_Start+0xdb(main_module=0x400000, \
filename=0x8049c98) [process.c:426]) (ebp=bffff90c)  11 0x4012e4d6 \
(PROCESS_InitWine+0x1f6(argc=0x2, argv=0xbffffb14) [process.c:495]) (ebp=bffffa4c)  \
12 0x080488b1 (Letext [main.c]) (ebp=bffffaac)  13 0x40328a42 (_end+0x838b6) \
(ebp=bffffae8)  14 0x080486e1 (_start+0x21) (ebp=00000000)

Since, I don't know, how to debug this further, I would be glad to get
some ideas/hints or requests for more input :-)

Greetings, 

Peter


["shared_sections_1.patch" (application/octet-stream)]

-- 
Peter Ganten
peter@ganten.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic