Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!hubcap!ncrcae!ncr-sd!greg From: greg@ncr-sd.SanDiego.NCR.COM (Greg Noel) Newsgroups: comp.unix.questions Subject: Re: Stack Direction -- Any War Stories? Message-ID: <1962@ncr-sd.SanDiego.NCR.COM> Date: 21 Dec 87 21:15:06 GMT References: <205@ksr.UUCP> Reply-To: greg@ncr-sd.SanDiego.NCR.COM (Greg Noel) Organization: NCR Corporation, Rancho Bernardo Lines: 17 In article <205@ksr.UUCP> benson@ksr.UUCP writes: >Has anyone any war stories of porting an application across a stack >direction boundary and having it break due to pointer magnitude comparisons >or other difficulties? How about vi? When we were porting Unix to a processor not only had a stack that grew upward, but also had the stack in low memory (well, below the heap), we found, after a long series of seemingly random problems, that the routine to free memory attempted to see if the address of the item to be freed was above or below one of its parameters and only called free() if the address was lower. Therefore, in our case, it tried to free() things on the stack and never freed things on the heap. Obviously, eventually, things got trashed in strange ways and it would punt. This was some time ago; the problem may have since been fixed. -- -- Greg Noel, NCR Rancho Bernardo Greg.Noel@SanDiego.NCR.COM or greg@ncr-sd