From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,85404311f8041f7a X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,5747331edea7cbab X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-07-15 17:15:50 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!iad-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!kilgallen From: Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) Newsgroups: comp.sys.dec,comp.arch Subject: Re: using freed and/or beyond-top-of-stack memory (was: Re: CPU failure in an SMP system (was Re: Compaq kills Alpha)) Message-ID: References: <994616870.688233@haldjas.folklore.ee> <9is4o7$pt0$1@mach.thp.univie.ac.at> Organization: LJK Software Date: 15 Jul 2001 20:15:29 -0500 NNTP-Posting-Host: 216.44.122.34 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 995242531 216.44.122.34 (Mon, 16 Jul 2001 00:15:31 GMT) NNTP-Posting-Date: Mon, 16 Jul 2001 00:15:31 GMT Xref: archiver1.google.com comp.sys.dec:5864 comp.arch:14032 In article <9is4o7$pt0$1@mach.thp.univie.ac.at>, jthorn@mach.thp.univie.ac.at (Jonathan Thornburg) writes: > In an article whose nested quoting has overflowed my mental stack, > someone wrote >> there is a lot of C code that depends on the stack or heap containing >> the correct data even after it has been released. Its bad enough that the >> code does that, but I've had enough experience dealing with the folk who >> have done this to know that they consider this to be acceptable, and they >> expect it to work, logic to the contrary. > > In article <3B517D2D.2E0F8142@hda.hydro.com>, > Terje Mathisen wrote: >>This is _not_ a valid reason to allow such code to keep working. >> >>IMNSHO code like that should be 'terminated with extreme prejudice', and >>the perpetrators forced to write at least one working Dos program, where >>the application stack is also the hw interrupt stack. > > Not to mention SPARC, where register-window over/underflow trap > handlers can (and actually do!) clobber memory beyond the top of the > stack at unpredictable times. I'm not sure if this is true for user > code too, or just for kernel, though... On VMS it can happen during user mode AST handling. But again this is another flaw due to the use of pointer arithmetic. Using a language (e.g., Pascal or Ada) with good support for output parameters avoids it (providing the programmer does not try to emulate C in the other language).