Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!mailrus!ncar!ico!ism780c!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: effect of free() Message-ID: <14297@haddock.ima.isc.com> Date: 15 Aug 89 23:59:53 GMT References: <319@cubmol.BIO.COLUMBIA.EDU> <3756@buengc.BU.EDU><320@cubmol.BIO.COLUMBIA.EDU> <3777@buengc.BU.EDU> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 13 In article <3777@buengc.BU.EDU> bph@buengc.bu.edu (Blair P. Houghton) writes: >I guess the word is, once space is freed, don't even try to get data >out of it. It's worse than that. Once space is free()'d, don't even copy the obsolete pointer value from one pointer object to another. If the segment has been released, loading its value into an address register could cause a trap. On the other side, it really was legal (and even encouraged) at one time to do certain things after calling free(). This has generally been recognized as a mistake, though I suspect the offending man pages still exist. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint