🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #24701

Re: stack sniffer evils

#24701
From: Jim Cathey
Date: Thu, 04 Feb 1988 16:58
25 lines
1649 bytes
In article <363@moncsbruce.oz> conybear@moncsbruce.oz (Roland Conybeare) writes:
>The solution:
>	The ideal solution to this inappropriate bomb would be for Apple
>to have provided some way of turning off the stack sniffer.  The next best
>thing would be to do it ourselves.
>	My current solution is to replace the SysError() trap with my
>own version, which ignores 'stack in the heap' errors while passing other
>errors on to the original trap handler.  This means the stack sniffer still
>detects 'stack in the heap' up to 60 times a second, but my SysError() trap
>says the application managed to recover from the error.

The stack sniffer is easily disabled by placing a zero in the global
variable StkLowPt ($110-$113).  The sniffer code then ignores the
stack.  When you're done, you should restore it to whatever it was so
that the stack sniffer will start working again.  I don't remember
where this was documented, but it is a relatively well-known technique.

+----------------+
! II      CCCCCC !  Jim Cathey
! II  SSSSCC     !  ISC Systems Corp.
! II      CC     !  TAF-C8;  Spokane, WA  99220
! IISSSS  CC     !  UUCP: uunet!iscuva!jimc
! II      CCCCCC !  (509) 927-5757
+----------------+
			"With excitement like this, who is needing enemas?"
Technical Details
Message-ID: <1142@iscuva.ISCS.COM>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!iscuva!jimc
References: <363@moncsbruce.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!iscuva!jimc
From: jimc@iscuva.ISCS.COM (Jim Cathey)
Newsgroups: comp.sys.mac
Subject: Re: stack sniffer evils
Message-ID: <1142@iscuva.ISCS.COM>
Date: 4 Feb 88 16:58:47 GMT
References: <363@moncsbruce.oz>
Organization: ISC Systems Corporation, Spokane, WA
Lines: 25
Keywords: mac programming, lightweight processes, SysError()