Re: [hatari-devel] Data cache Issues? |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Le 06/06/2015 22:07, Nicolas Pomarède a écrit :
If the depacker doesn't flush the instr cache, you can be sure a crash can happen ; depending on the packers, some of them are moving the depacked code at the same place that the depacker code was (to reduce memory footprint), so chances of getting a cache mismatch are even higher.
Hijust to be sure the problem was not related to the depacker, I extracted "Whirlpool" demo by manually depacking the Atomic 3.5 data. The resulting program was still crashing, so it was another problem than clearing the cache after depacking.
Adding some checks showed that it was a data cache mismatch.After quite some low level debugging and diving into the cache's inner work :) , I found it was related to a case where a write to memory didn't correctly invalidate an old entry in the data cache (on a 'miss'), causing subsequent reads to return an old value instead of the most recent one, hence the crash.
Whirlpool is now running correctly, even when packed (but the fact that the depacker doesn't clear cache could still lead to crash sometimes, although it should be very rare)
Eero, could you test again those demos that didn't work and for which you added a note ?
Nicolas
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |