Re: [hatari-devel] Natfeats regression?

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


On Freitag, 17. Juni 2022 13:04:08 CEST Eero Tamminen wrote:

> What do you think of the attached patch?

 

The first change looks ok, but the assertion seems to be wrong. assert() will terminate the emulator (and only if compiled with DEBUG), not the faulty Atari program.

 

Basically, if i understand the code correctly, first a quick check for a valid area is made (presumably because that is the common case, and faster than the 2nd loop; otherwise the first check would be superfluous). If the first check fails, it drops into checking whether at least part of the supplied area is accessible. If that fails too, you should generate a bus-error instead of the assertion.

 

>And would some other exception than bus error be suitable for such issues?

 

buserror is correct, since that is what you also would get on real machines when passing invalid addresses. After all, the purpose of these checks is just to make sure that a faulty Atari program does not crash the emulator.

 



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