[comp.sys.amiga.programmer] What does "trashing low memory vectors" mean?

yorkw@stable.ecn.purdue.edu (Willis F York) (01/10/91)

Well just for the FUN of it i turned on GOMF's Lowmemory vector checking.
(DW was complaing about these vectors to, as wellas a nother anti-virus prog)

and it seems EVERY time CED opens a File requestor, a Vector gets "trashed"

the vector is 00000078, and it gets a value of 00c6f018, 
What does this mean? What's a Low-memory-vector?

C-ya..

--
yorkw@ecn.purdue.edu  Willis F York    
----------------------------------------------
Macintosh... Proof that a Person can use a Computer all day and still
not know ANYTHING about computers. 

peter@cbmvax.commodore.com (Peter Cherna) (01/10/91)

In article <yorkw.663446190@stable.ecn.purdue.edu> yorkw@stable.ecn.purdue.edu (Willis F York) writes:
>Well just for the FUN of it i turned on GOMF's Lowmemory vector checking.
>(DW was complaing about these vectors to, as wellas a nother anti-virus prog)
>
>and it seems EVERY time CED opens a File requestor, a Vector gets "trashed"
>
>the vector is 00000078, and it gets a value of 00c6f018, 
>What does this mean? What's a Low-memory-vector?

There are areas of memory that some errant programs can damage, and
they're in low-memory.  GOMF watches for people who do this, and
then restores the old contents, protecting those areas of memory.

Now GOMF wedges into the OpenWindow() call for its own purposes, but
it doesn't handle the failure of OpenWindow() correctly.  CygnusEd
tries to open a really big file requester, then successively smaller
ones until it fits.  Thus, OpenWindow() for the file requester can
fail on account of the window being too big.  The bug in GOMF causes
low memory to be trashed, which GOMF then "discovers", and figures
is CED's fault, when it's its own.
>
>C-ya..
>
>--
>yorkw@ecn.purdue.edu  Willis F York    

     Peter
--
     Peter Cherna, Software Engineer, Commodore-Amiga, Inc.
     {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
My opinions do not necessarily represent the opinions of my employer.
"Oh, PIN-compatible!  I thought you wanted me to make it IN-compatible!"

mykes@zorch.SF-Bay.ORG (Mike Schwartz) (01/11/91)

In article <yorkw.663446190@stable.ecn.purdue.edu> yorkw@stable.ecn.purdue.edu (Willis F York) writes:
>Well just for the FUN of it i turned on GOMF's Lowmemory vector checking.
>(DW was complaing about these vectors to, as wellas a nother anti-virus prog)
>
>and it seems EVERY time CED opens a File requestor, a Vector gets "trashed"
>
>the vector is 00000078, and it gets a value of 00c6f018, 
>What does this mean? What's a Low-memory-vector?
>
>C-ya..
>
>--
>yorkw@ecn.purdue.edu  Willis F York    
>----------------------------------------------
>Macintosh... Proof that a Person can use a Computer all day and still
>not know ANYTHING about computers. 

Memory location $78 is the Level 6 autovector of the 68000.  The first
256 longwords in memory are known as vectors.  These vectors typically
point at a routine that causes a GURU meditation to happen.  The autovectors
are the main exception to this rule.  The level 6 autovector is used for
"external" interrupts according to my Amiga hardware manual, and I can see
NO reason why CED should be mucking with it.  Perhaps they feel that it is
a global longword that is safe to store some important piece of information
in, or the developer has some peice of hardware that takes advantage of
this vector.  I don't know of any hardware that does, thoough, so it may
be home-brewed.  Whatever it is, it is not a good thing for CED to be doing.

This sounds like something you would see on a PC, or in other words, a kludge.

Mykes

johnv@tower.actrix.gen.nz (John Veldthuis) (01/15/91)

Quoted from <1991Jan10.200642.26708@motaus.sps.mot.com> by skipper@motaus.sps.mot.com (Skipper Smith):
> In article <yorkw.663446190@stable.ecn.purdue.edu> yorkw@stable.ecn.purdue.edu (Willis F York) writes:
> >Well just for the FUN of it i turned on GOMF's Lowmemory vector checking.
> >(DW was complaing about these vectors to, as wellas a nother anti-virus prog)
> >
> >and it seems EVERY time CED opens a File requestor, a Vector gets "trashed"
> >
> Is that 00000078 decimal or hex?  Actually, it doesn't matter since either 
> value would put it in the range of acceptable user vectors.  What CED must be
> doing is defining the vector so that whenever some event that the program
> defines occurs an exception will cause the system to start executing code at
> address 00c6f018.  I would suggest that you look there to see what that code
> is doing and maybe many more questions then I could ever answer will be found.
>  

This is actually GOMF doing all the stomping and reporting on itself.
A bit of bad programming was done in GOMF and the return value from the
OpenWindow call that GOMF takes over is not checked. GOMF then tries to put
a value into the Task structure to track the window but if the window did
not open the value is zero. GOMF is trying to stuff the value into offset
$78 from the return value which stomps on the Low Memory Vector.
Therefore please stop abusing CED which is a great product and stop using
GOMF or get a version that has been hacked to stop this happening.
--
*** John Veldthuis, NZAmigaUG.         johnv@tower.actrix.gen.nz       ***