home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!samsung!transfer!ceylon!choffman.gte.com!user
- From: chuck@gte.com (Chuck Hoffman)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Help! System error #28
- Message-ID: <chuck-130892084411@choffman.gte.com>
- Date: 13 Aug 92 12:49:44 GMT
- References: <chuck-120892123052@choffman.gte.com>
- Sender: news@ceylon.gte.com
- Followup-To: comp.sys.mac.programmer
- Organization: GTE Laboratories
- Lines: 35
-
- In article <chuck-120892123052@choffman.gte.com>, chuck@gte.com (Chuck
- Hoffman) wrote:
- >
- > SystemErrors DA says "stack has moved into application heap." Is this
- > simply a memory management problem, or is it really something else
- > masquerading as a memory problem with a bogus return?
-
- In article <chuck-120892141258@choffman.gte.com>, chuck@gte.com (Chuck
- Hoffman) wrote:
- >
- > Arrrrgggghhhh!!!! I changed the program SIZE parameter and the error
- > changed to #25 (out of memory). Something is definitely running amok.
-
- Problem solved.
-
- I got some very interesting and helpful information about stack management
- from John Wallace at TRW. Thanks much, John. I appreciate it.
-
- The problem turned out to be a dumb error masquerading as a memory
- management problem, though. I had passed an int to FSRead for the number
- of bytes to read. It was expecting a long, so FSRead thought the few bytes
- ahead of my int were the upper half of a long word with a VERY large value.
- Naturally, the read overflowed the buffer in the stack and manifested
- itself as error #28 or #25.
-
- This kind of problem would have been much easier to debug at the assembly
- level with MacsBug, rather than at the source level with THINK C Debugger.
- I'm a very experienced programmer using IBM System/370 Assembly Language
- (mainframe). I simply must learn 680x0 assembly language. Any
- recommendations for textbook, course, or assembler software?
-
- -Chuck Hoffman
-
- I'm not sure why we're here, but I am sure that while we're here we're
- supposed to help each other.
-