Re: [hatari-devel] memory setup segfault

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 07/11/2023 à 23:14, Nicolas Pomarède a écrit :
Le 06/11/2023 à 20:30, Thomas Huth a écrit :

I can reproduce the crash, but only with --enable-debug.

I can also reproduce it by starting without hatari.cfg with:

  hatari --machine ste --tos tos206fr.rom --memsize 14

Then go to the GUI, select 1 MB and return from the GUI.

Thanks, I can get the crash too with this scenario.

This is similar to previous crash when going from falcon to st with >= 4MB , MMU conf at ff8001 will store 0xf (invalid size for both memory banks) and MMU_Bank0_Size will be set to 0 at start, but will also keeps its 0 value after reset when calling memory_init with <= 4 MB, which calls memory_map_Standard_RAM and trigger the crash

I will look for a correct place to ensure MMU_Bank0_Size has a correct value in these cases.


Patch pushed.

STMemory_Reset() will now be called earlier during Reset_ST(), which ensures the MMU conf used in STF/STE/TT at FF8001 will have a 0 value at start and MMU_BankX_Size will be != 0 too (banks' size could be 0 when using more than 4MB)

I tried a few combinations between Falcon, ST, 8MB, 1MB and I don't get a crach anymore.

Nicolas




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/