https://bugs.winehq.org/show_bug.cgi?id=38432
Bug ID: 38432 Summary: Xeon (Xbox emulator) fails to run - invalid address Product: Wine Version: 1.7.41 Hardware: x86 URL: http://www.emulator-zone.com/doc.php/xbox/xeon.html OS: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: austinenglish@gmail.com Distribution: ---
User asked about it in #winehq, appdb shows old results (failed in 1.1.29: https://appdb.winehq.org/objectManager.php?sClass=version&iId=17840
But it appears to have the same issue now as then: austin@debian-home:~/x$ wine Xeon.exe wine: Invalid address.
austin@debian-home:~/x$ file Xeon.exe Xeon.exe: PE32 executable (GUI) Intel 80386, for MS Windows
https://bugs.winehq.org/show_bug.cgi?id=38432
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Summary|Xeon (Xbox emulator) fails |Xeon 1.0 (Xbox emulator) |to run - invalid address |fails to load (PE image | |prelinked into DOS reserved | |area and default process | |heap range, no relocation | |possible)
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
Some "genius" prelinked the executable to 0x10000 and made the image non-relocatable (code in 'newcode' text section assumes a fixed address space layout/mapping).
--- snip --- $ WINEDEBUG=+tid,+seh,+relay,+module wine ./Xeon.exe >>log.txt 2>&1 ... 0009:trace:module:get_load_order looking for L"Z:\home\focht\Downloads\Xeon.exe" 0009:trace:module:get_load_order got main exe default n,b for L"Z:\home\focht\Downloads\Xeon.exe" 0009:trace:module:load_native_dll Trying native dll L"Z:\home\focht\Downloads\Xeon.exe" 0009:trace:module:map_image mapped PE file at 0x240000-0x70e000 0009:trace:module:map_image mapping section .text at 0x241000 off 1000 size 4c9000 virt 4c8748 flags 60000020 0009:trace:module:map_image mapping section newcode at 0x70a000 off 4ca000 size 1000 virt 48 flags 60000020 0009:trace:module:map_image mapping section .rdata at 0x70b000 off 4cb000 size 2000 virt 11e6 flags 40000040 0009:trace:module:map_image mapping section .data at 0x70d000 off 4cd000 size 1000 virt 838 flags c0000040 0009:warn:module:map_image Need to relocate module from 0x10000 to 0x240000, but there are no relocation records 0009:warn:module:load_dll Failed to load module L"Z:\home\focht\Downloads\Xeon.exe"; status=c0000018 ... wine: Invalid address. --- snip ---
Dump of relevant header/section info:
--- snip --- ... ->Optional Header Magic: 0x010B (HDR32_MAGIC) MajorLinkerVersion: 0x07 MinorLinkerVersion: 0x0A -> 7.10 SizeOfCode: 0x004CA000 SizeOfInitializedData: 0x00003000 SizeOfUninitializedData: 0x00000000 AddressOfEntryPoint: 0x004C5B65 BaseOfCode: 0x00001000 BaseOfData: 0x004CB000 ImageBase: 0x00010000 SectionAlignment: 0x00001000 FileAlignment: 0x00001000 MajorOperatingSystemVersion: 0x0004 MinorOperatingSystemVersion: 0x0000 -> 4.00 MajorImageVersion: 0x0000 MinorImageVersion: 0x0000 -> 0.00 MajorSubsystemVersion: 0x0004 MinorSubsystemVersion: 0x0000 -> 4.00 Win32VersionValue: 0x00000000 SizeOfImage: 0x004CD838 SizeOfHeaders: 0x00001000 CheckSum: 0x00000000 Subsystem: 0x0002 (WINDOWS_GUI) DllCharacteristics: 0x0000 SizeOfStackReserve: 0x00100000 SizeOfStackCommit: 0x00100000 SizeOfHeapReserve: 0x00100000 SizeOfHeapCommit: 0x00001000 LoaderFlags: 0x00000000 NumberOfRvaAndSizes: 0x00000010
DataDirectory (16) RVA Size ------------- ---------- ---------- ExportTable 0x00000000 0x00000000 ImportTable 0x004CBD48 0x0000003C (".rdata") Resource 0x00000000 0x00000000 Exception 0x00000000 0x00000000 Security 0x00000000 0x00000000 Relocation 0x00000000 0x00000000 Debug 0x00000000 0x00000000 Copyright 0x00000000 0x00000000 GlobalPtr 0x00000000 0x00000000 TLSTable 0x00000000 0x00000000 LoadConfig 0x004CBCE8 0x00000048 (".rdata") BoundImport 0x00000000 0x00000000 IAT 0x004CB000 0x000000D0 (".rdata") DelayImport 0x00000000 0x00000000 COM 0x00000000 0x00000000 Reserved 0x00000000 0x00000000 --- snip ---
--- snip --- ->Section Header Table 1. item: Name: .text VirtualSize: 0x004C8748 VirtualAddress: 0x00001000 SizeOfRawData: 0x004C9000 PointerToRawData: 0x00001000 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0x60000020 (CODE, EXECUTE, READ)
2. item: Name: newcode VirtualSize: 0x00000048 VirtualAddress: 0x004CA000 SizeOfRawData: 0x00001000 PointerToRawData: 0x004CA000 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0x60000020 (CODE, EXECUTE, READ)
3. item: Name: .rdata VirtualSize: 0x000011E6 VirtualAddress: 0x004CB000 SizeOfRawData: 0x00002000 PointerToRawData: 0x004CB000 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0x40000040 (INITIALIZED_DATA, READ)
4. item: Name: .data VirtualSize: 0x00000838 VirtualAddress: 0x004CD000 SizeOfRawData: 0x00001000 PointerToRawData: 0x004CD000 PointerToRelocations: 0x00000000 PointerToLinenumbers: 0x00000000 NumberOfRelocations: 0x0000 NumberOfLinenumbers: 0x0000 Characteristics: 0xC0000040 (INITIALIZED_DATA, READ, WRITE) --- snip ---
This obviously can't work since Wine keeps that area reserved for DOS apps and also places the default process heap after.
It can be made to work by making address space tweaks (loader/preloader, ntdll/virtual).
Since there are no further apps requiring this, it might not be worth to potentially break things by changing the current virtual address space layout.
$ sha1sum Xeon_10.rar 64090d99fbd476bb0fb8014f9e2b6cd362812285 Xeon_10.rar
$ du -sh Xeon_10.rar 980K Xeon_10.rar
$ wine --version wine-1.7.41
Regards
https://bugs.winehq.org/show_bug.cgi?id=38432
--- Comment #2 from Austin English austinenglish@gmail.com --- (In reply to Anastasius Focht from comment #1)
This obviously can't work since Wine keeps that area reserved for DOS apps and also places the default process heap after.
Given that Wine can use Dosbox and there has been talk of removing DOS support, this still may be possible. Not my decision, of course ;).
https://bugs.winehq.org/show_bug.cgi?id=38432
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #3 from super_man@post.com --- bug 17277 is dupe or similar issue. The starting address is the same.
https://bugs.winehq.org/show_bug.cgi?id=38432
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
--- Comment #4 from André H. nerv@dawncrow.de --- (In reply to Austin English from comment #2)
(In reply to Anastasius Focht from comment #1)
This obviously can't work since Wine keeps that area reserved for DOS apps and also places the default process heap after.
Given that Wine can use Dosbox and there has been talk of removing DOS support, this still may be possible. Not my decision, of course ;).
Xeon.exe works here in both 32- and 64-bit prefix with wine 3.14 Might be related to the meanwhile removed DOS support... Can someone please confirm?
https://bugs.winehq.org/show_bug.cgi?id=38432
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=17277
https://bugs.winehq.org/show_bug.cgi?id=38432
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Component|-unknown |ntdll Fixed by SHA1| |a27f187503f55de4b0c703bdb2d | |24dd07cd63cc1 See Also|https://bugs.winehq.org/sho | |w_bug.cgi?id=17277 |
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
this was fixed by https://source.winehq.org/git/wine.git/commitdiff/a27f187503f55de4b0c703bdb2...
Thanks Alexandre
--- snip --- $ pwd /home/focht/Downloads/xeon10
$ file * Halo.ini: ASCII text, with CRLF line terminators Readme.txt: ASCII text, with CRLF line terminators XeonCore.dll: PE32 executable (DLL) (GUI) Intel 80386, for MS Windows Xeon.exe: PE32 executable (GUI) Intel 80386, for MS Windows XeonGUI.dll: PE32 executable (DLL) (GUI) Intel 80386 (stripped to external PDB), for MS Windows Xeon.ini: ASCII text, with CRLF line terminators XeonInput.dll: PE32 executable (DLL) (GUI) Intel 80386, for MS Windows XeonInputGUI.dll: PE32 executable (DLL) (GUI) Intel 80386 (stripped to external PDB), for MS Windows
$ WINEDEBUG=+seh,+relay,+module wine ./Xeon.exe >>log.txt 2>&1 ... 0032:trace:module:load_native_dll Trying native dll L"Z:\home\focht\Downloads\xeon10\Xeon.exe" 0032:trace:module:map_image mapped PE file at 0x240000-0x70e000 0032:trace:module:map_image mapping section .text at 0x241000 off 1000 size 4c9000 virt 4c8748 flags 60000020 0032:trace:module:map_image mapping section newcode at 0x70a000 off 4ca000 size 1000 virt 48 flags 60000020 0032:trace:module:map_image mapping section .rdata at 0x70b000 off 4cb000 size 2000 virt 11e6 flags 40000040 0032:trace:module:map_image mapping section .data at 0x70d000 off 4cd000 size 1000 virt 838 flags c0000040 0032:warn:module:perform_relocations Need to relocate module from 0x10000 to 0x240000, but there are no relocation records 0032:warn:module:load_dll Failed to load module L"Z:\home\focht\Downloads\xeon10\Xeon.exe"; status=c0000018 ... 0034:trace:module:get_load_order looking for L"Z:\home\focht\Downloads\xeon10\Xeon.exe" 0034:trace:module:get_load_order got main exe default n,b for L"Z:\home\focht\Downloads\xeon10\Xeon.exe" 0034:trace:module:load_native_dll Trying native dll L"Z:\home\focht\Downloads\xeon10\Xeon.exe" 0034:trace:module:map_image mapped PE file at 0x10000-0x4de000 0034:trace:module:map_image mapping section .text at 0x11000 off 1000 size 4c9000 virt 4c8748 flags 60000020 0034:trace:module:map_image mapping section newcode at 0x4da000 off 4ca000 size 1000 virt 48 flags 60000020 0034:trace:module:map_image mapping section .rdata at 0x4db000 off 4cb000 size 2000 virt 11e6 flags 40000040 0034:trace:module:map_image mapping section .data at 0x4dd000 off 4cd000 size 1000 virt 838 flags c0000040 0034:warn:module:alloc_module disabling no-exec because of L"Xeon.exe" 0034:trace:module:set_security_cookie initializing security cookie 0x4dd170 0034:trace:module:load_dll Loaded module L"Z:\home\focht\Downloads\xeon10\Xeon.exe" (native) at 0x10000 ... --- snip ---
--- snip --- $ info share Module Address Debug info Name (100 modules) PE 10000- 4de000 Export xeon PE 820000- 8d5000 Export xeongui ELF 7b400000-7b7f4000 Dwarf kernel32<elf> -PE 7b420000-7b7f4000 \ kernel32 ELF 7bc00000-7bd10000 Dwarf ntdll<elf> -PE 7bc30000-7bd10000 \ ntdll ELF 7c000000-7c004000 Deferred <wine-loader> ... --- snip ---
$ wine-3.15-66-gc5bb108484
Regards
https://bugs.winehq.org/show_bug.cgi?id=38432
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.16.