27 December 2015, 18:07 | #1 |
Registered User
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 56
|
built-in rom crashes client and host on shrinkler-packed executables
While trying to run octorubber (or other demos packed with same packer), on a4000 default config, with the replacement rom, the amiga-side emulator crashes, and then the host system crashes.
Repro steps: 1. WinUAE 3.2.2 (I used a clean download) 2. quickstart a4000 config - no roms 3. add dh0 as an empty folder 4. put octorubber in the folder (http://www.pouet.net/prod.php?which=64249 -> download -> unpack it) 5. boot the emulator 6. launch octorubber from the CLI Repro rate 100% (5/5 attempts) Note: I have done the same with an executable I shrinkler-packed - same crash. If I didn't shrinkler-pack my executable, it didn't crash. This repros in 3.0.0 as well. Note: With a tweaked configurations, the WinUAE host does not crash, but the demo just never launches. In the debugger I see the program counter is in some weird address in not real memory. I suspect there are 2 bugs here: 1. the built-in replacement ROM doesn't properly launch Shrinkler-packed executables because of Shrinkler's assumptions about registers ("Your Amiga program just did something terribly stupid" in the log). This seems like a compatibility bug and was reported on aros-exec.org. 2. WinUAE (host side) crashes as a side effect of this. Note from the author of Shrinkler about the AROS rom: "my guess is it leaves registers in a different state than the AmigaOS launcher. Shrinkler assumes that A3 points to the loaded segment list (4 bytes before the entry point) which is true for all Amiga kickstarts but might not be for AROS. If A3 points to garbage, it could give the behavior you describe" |
27 December 2015, 19:32 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,507
|
Hmm.. Looks like A3 pointing to seglist is just a randomly chosen temp register used as a jump address and application imho shouldn't assume it containing anything useful.
Contents of A2, A5 and A6 and others are side-effect of BCPL calling convention and they need to be exactly correct but A3 is more or less a BCPL scratch register. Anyway, it can be "fixed".. |
28 December 2015, 02:24 | #3 |
Registered User
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 56
|
Heh, it isn't the first time an undocumented side effect became a useful feature :-)
Since it is consistent across all kickstarts, i can understand why the author took advantage of it. I think fixing the actual host-side crash is also important - not just make the rom emulate the a3 behavior (which will probably mask the crash) Thank you for looking at this. I am always impressed by your dedication and quick responses. Last edited by Hannibal; 28 December 2015 at 02:25. Reason: Fixing typos |
28 December 2015, 12:21 | #4 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,507
|
"Fix" committed but I am not yet sure when I'll update built-in ROM. There has been some endian problems and other changes that only affect m68k and I am not sure if they are all fixed.
|
28 December 2015, 17:46 | #5 |
Registered User
Join Date: May 2015
Location: Kirkland, Washington, USA
Posts: 56
|
Thank you :-)
|
28 December 2015, 21:40 | #6 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
|
28 December 2015, 21:42 | #7 |
Registered User
Join Date: Aug 2007
Location: berlin/germany
Posts: 1,054
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Executables and initial register values | copse | Coders. General | 10 | 23 June 2022 14:39 |
CD-ROM on omniscsi.device crashes WinUAE | thomas | support.WinUAE | 4 | 09 August 2015 21:20 |
run executables as df0: | jbl007 | support.WinUAE | 6 | 10 March 2015 20:39 |
Built-in AROS ROM crashes on 68000 | mark_k | support.WinUAE | 3 | 17 July 2012 12:02 |
How are TOSECs packed | wlcina | New to Emulation or Amiga scene | 10 | 03 December 2005 13:18 |
|
|