https://bugs.winehq.org/show_bug.cgi?id=17277
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |focht@gmx.net Summary|Remote virtual memory |ZFlash numerical control |allocation error |app needs address space | |between 0x100000-0x800000 | |(1-8 MiB) which conflicts | |with process heap location Ever confirmed|0 |1
--- Comment #8 from Anastasius Focht focht@gmx.net --- Hello folks,
next time please attach precompiled *release* builds of the apps. Debug builds don't add any value. In fact they link to the debug versions of the MSVC++ runtime which are not (to be) distributed.
To illustrate what Alexandre said...
Parent process starting child process suspended and freeing up child address space:
--- snip --- $ wine ./ZLoader.exe test.exe fixme:heap:HeapSetInformation (nil) 1 (nil) 0 ZLoader - VirtualFreeEx BaseAddress: 00110000 - Size: 00010000 ZLoader - VirtualFreeEx BaseAddress: 00220000 - Size: 00001000 ZLoader - VirtualFreeEx BaseAddress: 00221000 - Size: 00001000 ZLoader - VirtualFreeEx BaseAddress: 00230000 - Size: 00003000 --- snip ---
Relevant part of trace log:
--- snip --- ... 0031:trace:virtual:NtAllocateVirtualMemory 0xffffffff (nil) 00110000 2000 00000004 0031:trace:virtual:map_view got mem in reserved area 0x110000-0x220000 0031:trace:virtual:VIRTUAL_DumpView View: 0x110000 - 0x21ffff (valloc) 0031:trace:virtual:VIRTUAL_DumpView 0x110000 - 0x21ffff --rw- 0031:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x110000 00010000 1000 00000004 0031:trace:virtual:VIRTUAL_SetProt 0x110000-0x11ffff c-rw- 0031:trace:virtual:VIRTUAL_DumpView View: 0x110000 - 0x21ffff (valloc) 0031:trace:virtual:VIRTUAL_DumpView 0x110000 - 0x11ffff c-rw- 0031:trace:virtual:VIRTUAL_DumpView 0x120000 - 0x21ffff --rw- 0031:trace:virtual:NtAllocateVirtualMemory 0xffffffff (nil) 0000065c 1000 00000004 0031:trace:virtual:map_view got mem in reserved area 0x220000-0x221000 0031:trace:virtual:VIRTUAL_DumpView View: 0x220000 - 0x220fff (valloc) 0031:trace:virtual:VIRTUAL_DumpView 0x220000 - 0x220fff c-rw- 0031:trace:virtual:NtAllocateVirtualMemory 0xffffffff (nil) 0000232c 1000 00000004 0031:trace:virtual:map_view got mem in reserved area 0x230000-0x233000 0031:trace:virtual:VIRTUAL_DumpView View: 0x230000 - 0x232fff (valloc) 0031:trace:virtual:VIRTUAL_DumpView 0x230000 - 0x232fff c-rw- 0031:trace:virtual:VIRTUAL_DumpView View: 0x7bc10000 - 0x7bceefff (system) 0031:trace:virtual:VIRTUAL_DumpView 0x7bc10000 - 0x7bceefff c-rWx 0031:trace:virtual:virtual_create_builtin_view created 0x7bc10000-0x7bcef000 ... 0031:Call KERNEL32.__wine_kernel_init() ret=7bc5a259 ... 002f:Call KERNEL32.VirtualFreeEx(0000004c,00110000,00000000,00008000) ret=004010a4 002f:Call ntdll.NtFreeVirtualMemory(0000004c,0033f954,0033f958,00008000) ret=7b882bb3 002f:trace:virtual:NtFreeVirtualMemory 0x4c 0x110000 00000000 8000 0031:trace:virtual:NtFreeVirtualMemory 0xffffffff 0x110000 00000000 8000 002f:Ret ntdll.NtFreeVirtualMemory() retval=00000000 ret=7b882bb3 ... 002f:Call KERNEL32.VirtualFreeEx(0000004c,00220000,00000000,00008000) ret=004010a4 002f:Call ntdll.NtFreeVirtualMemory(0000004c,0033f954,0033f958,00008000) ret=7b882bb3 002f:trace:virtual:NtFreeVirtualMemory 0x4c 0x220000 00000000 8000 0031:trace:virtual:NtFreeVirtualMemory 0xffffffff 0x220000 00000000 8000 002f:Ret ntdll.NtFreeVirtualMemory() retval=00000000 ret=7b882bb3 002f:Ret KERNEL32.VirtualFreeEx() retval=00000001 ret=004010a4 ... 002f:Call KERNEL32.VirtualFreeEx(0000004c,00221000,00000000,00008000) ret=004010a4 002f:Call ntdll.NtFreeVirtualMemory(0000004c,0033f954,0033f958,00008000) ret=7b882bb3 002f:trace:virtual:NtFreeVirtualMemory 0x4c 0x221000 00000000 8000 0031:trace:virtual:NtFreeVirtualMemory 0xffffffff 0x221000 00000000 8000 002f:Ret ntdll.NtFreeVirtualMemory() retval=00000000 ret=7b882bb3 002f:Ret KERNEL32.VirtualFreeEx() retval=00000001 ret=004010a4 ... 002f:Call KERNEL32.VirtualFreeEx(0000004c,00230000,00000000,00008000) ret=004010a4 002f:Call ntdll.NtFreeVirtualMemory(0000004c,0033f954,0033f958,00008000) ret=7b882bb3 002f:trace:virtual:NtFreeVirtualMemory 0x4c 0x230000 00000000 8000 0031:trace:virtual:NtFreeVirtualMemory 0xffffffff 0x230000 00000000 8000 002f:Ret ntdll.NtFreeVirtualMemory() retval=00000000 ret=7b882bb3 002f:Ret KERNEL32.VirtualFreeEx() retval=00000001 ret=004010a4 ... 002f:Call ntdll.NtAllocateVirtualMemory(0000004c,0033f914,00000000,0033f948,00002000,00000040) ret=7b882af9 002f:trace:virtual:NtAllocateVirtualMemory 0x4c 0x100000 00700000 2000 00000040 0031:trace:virtual:NtAllocateVirtualMemory 0xffffffff 0x100000 00700000 2000 00000040 0031:trace:virtual:VIRTUAL_DumpView View: 0x100000 - 0x7fffff (valloc) 0031:trace:virtual:VIRTUAL_DumpView 0x100000 - 0x7fffff --rwx 002f:Ret ntdll.NtAllocateVirtualMemory() retval=00000000 ret=7b882af9 002f:Ret KERNEL32.VirtualAllocEx() retval=00100000 ret=00401103 002f:Call user32.MessageBoxA(00000000,00408158 "ZLoader now will resume the thread",0040817c "ZLoader",00000040) ret=00401117 --- snip ---
Child process crash after the main thread is resumed by parent:
--- snip --- Unhandled exception: page fault on read access to 0x001106e4 in 32-bit code (0x7bc54d69). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:7bc54d69 ESP:0100ff40 EBP:0100ffa8 EFLAGS:00010246( R- -- I Z- -P- ) EAX:001106b0 EBX:7bcd2000 ECX:0100ffb0 EDX:00000023 ESI:ffb1d7b4 EDI:00000000 Stack dump: 0x0100ff40: 00000000 ffffffff 0100ff58 7bc395a6 0x0100ff50: 7bcdaf28 00000001 0100ff98 7bc3a0aa 0x0100ff60: 7bcdaf28 00000000 00000000 00000000 0x0100ff70: 00000000 7ffd8000 00000000 00000000 0x0100ff80: 00000000 00000000 00000000 0100ffb0 0x0100ff90: 7bcd2000 ffb1d7b4 0100ffe8 00000000 000c: sel=0067 base=00000000 limit=00000000 16-bit r-x Backtrace: =>0 0x7bc54d69 process_attach+0x2e(wm=0x1106b0, lpReserved=0x1) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:1148] in ntdll<elf> (0x0100ffa8) 1 0x7bc594d9 attach_process_dlls+0x53(wm=0x1106b0) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:2799] in ntdll<elf> (0x0100ffe8) 2 0xf753ffb5 wine_call_on_stack+0x1c() in libwine.so.1 (0x00000000) 3 0x7bc59a3b LdrInitializeThunk+0x2ca(kernel_start=<couldn't compute location>, unknown2=<couldn't compute location>, unknown3=<couldn't compute location>, unknown4=<couldn't compute location>) [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:2919] in ntdll<elf> (0xffb1d848) 4 0x7b8652cc __wine_kernel_init+0x67d() [/home/focht/projects/wine/wine.repo/src/dlls/kernel32/process.c:1276] in kernel32<elf> (0xffb1e708) 5 0x7bc5a259 __wine_process_init+0x156() [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:3133] in ntdll<elf> (0xffb1e768) 6 0xf753e825 wine_init+0x140(argc=0x2, argv=0xffb1ec74, error="", error_size=0x400) [/home/focht/projects/wine/wine.repo/src/libs/wine/loader.c:958] in libwine.so.1 (0xffb1e7a8) 7 0x7bf011ae main+0x132(argc=0x2, argv=0xffb1ec74) [/home/focht/projects/wine/wine.repo/src/loader/main.c:237] in <wine-loader> (0xffb1ebd8) 8 0xf734e963 __libc_start_main+0xf2() in libc.so.6 (0x00000000) 0x7bc54d69 process_attach+0x2e [/home/focht/projects/wine/wine.repo/src/dlls/ntdll/loader.c:1148] in ntdll<elf>: movl 0x34(%eax),%eax 1148 if ( ( wm->ldr.Flags & LDR_LOAD_IN_PROGRESS ) --- snip ---
This obviously can't work.
Changing/relocating the process heap because there is one app depending on this is questionable.
Anyway, you can change this on your own, making the app work:
http://source.winehq.org/git/wine.git/blob/34b2d920b47122007b65d435e064d018f...
If Alexandre says he doesn't want that change, the bug is essentially a WONTFIX.
Regards