[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Invalid S?_MAGIC



On Monday 10 Oct 2011 20:28:14 Peter Slegg wrote:
> On Sun, 2 Oct 2011 18:57:39 , Peter Persson <pep.fishmoose@gmail.com> wrote:
> > 2 okt 2011 kl. 18:53 skrev Peter Slegg:
> > > It lasted until I started Texel. See the screenshot.
> > 
> > Yes. And I have the impression that you misinterpret that dialog as "the
> > problem is within Thing". Now, Texel is an ASH application and most
> > likely originally designed for MagiC. I own several ASH applications and
> > they either have inherent problems with memory protection OR have their
> > executable flags set wrong by default.
 
> If MP is protecting memory, how is it that Texel or any app doing something
> it shouldn't, causes Thing to be killed ?

If Texel is passing a privately allocated buffer (therefore one that can't be 
shared in any way) to Thing to read, Thing violates that privately allocated 
memory by trying to read it. Texel is the one in error by not following sane 
coding practices, but Thing is the one to suffer the consequences. Texel is 
*not* trying to access memory that doesn't belong to it or hasn't been 
allocated as global. Thing is.

> Surely, the app that violated MP should be halted ?

That's what happened. Thing violated Texel's privately allocated memory by 
trying to read it and was rightly killed. It's Texel's own damn fault, but 
hey.

> Better still it
> should be paused and the user asked if it is ok to allow the access.

I don't know if this would be practical. I know Thing 1.29 is able to warn 
that some memory passed to it wasn't properly allocated (or something to that 
effect; the warnings are in German, which I don't understand).

> Or is Texel accessing some shared area and making a mess of it ?

See above. 

Cheers,
JFL
-- 
Jean-François Lemaire