Re: [hatari-devel] EKO System crash |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] EKO System crash
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sat, 31 Oct 2020 09:25:50 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1604132752; bh=zcmd+aOa0efh8RAc8fNZ72nLgLGkYBVLT9sOIICpZng=; h=Date:From:To:Subject:From; b=mE84NLT67WF6FSR7QaMOnz/zewLI7vSpE9KmmPMGr2PBTH3c4v5tc0k8BAtccl1gO lZVjDGFK9EOL525bQmjzm7rZ6fqPaTclvQRmsxxRWR1fkvBBMUgJQUA1brexPOVH3w JWvcfWH/hH0RDwRdqflXmkBYk8cTq7FPj4jsvkts8ZZD4w9fOyzW0n+Glwj8OCsglJ BssmXGZ2RgH044RL7j4SwbO/N76+Jglt05dxzPLmwGuT+0gzC5Y6zFvnHMjancXeW8 KP78ZMaCN+0RkdjL5w0D88//U/q/nbC9o2bk65C+pps2W+05tfKCKjmV8LSMf5fIfE dwZ12y9w8LBKQ==
Am Sat, 31 Oct 2020 09:08:04 +0100
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
> Le 31/10/2020 à 07:13, Thomas Huth a écrit :
> > Am Thu, 29 Oct 2020 00:11:52 +0200
> > schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
> >
> >> On 10/27/20 1:12 AM, Eero Tamminen wrote:
> > [...]
> >>>> EKO Systems: perfectly works (except a little transition in the
> >>>> betty boo image).
> >>>> Music plays well until the 3D scifi scene and plays well
> >>>> again in the tridi world.
> >>
> >> Close to end I got Hatari crash:
> >> -----------------------------------
> >> WARN : crossbar DMA Play: Illegal buffer size (from 0x0d84e8 to
> >> 0x0d84bc) Segmentation fault
> >
> > Looking at the crossbar code, I noticed that this could happily read
> > from beyond the STRam[] array if a Falcon program like EKO system
> > set the DMA start address higher than the end address.
> >
> > I've changed to code a little bit so that this should hopefully not
> > happen anymore, i.e. I hope it also won't crash anymore (though I
> > was not able to reproduce the crash here).
> >
> > As a bonus, the music should now play in the 3D racing scene of the
> > demo.
> >
> > Note: I've also updated the recording function accordingly, but I
> > did not test that part. Laurent, could you please try whether AFM
> > still works fine for you? Thanks!
>
> Hi
>
> I see you're doing "% STRamEnd" to limit the range ; maybe it would
> be better to use "&" to mask out of limit bits instead, as this is
> more "hardware like" ?
Which mask do you suggest? 0x00ffffff? But then we definitely still need
an additional check to make sure that we do not go beyond STRamEnd
here, to avoid that we access memory beyond the end of STRam[]...
BTW, how's that situation handled in src/dmaSnd.c ? I did not spot any
sanity checks there at a very first glance?
Thomas