home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!spool.mu.edu!sdd.hp.com!col.hp.com!fc.hp.com!sde.hp.com!mjs
- From: mjs@fc.hp.com (Marc Sabatella)
- Newsgroups: comp.software-eng
- Subject: Re: Reliability of Purify message - READS
- Date: 21 Jan 1993 18:34:04 GMT
- Organization: Hewlett-Packard Company
- Lines: 30
- Message-ID: <1jmqasINN8dn@hpfcbig.sde.hp.com>
- References: <cfL5NP600WBE8ab0xO@andrew.cmu.edu>
- Reply-To: marc@hpmonk.fc.hp.com
- NNTP-Posting-Host: hptrane.fc.hp.com
- X-Newsreader: TIN [version 1.1.2 PL6]
-
- : please explain how you can free memory without dereferencing the pointer
- : to the memory that you want to free (to be more precise, without
- : deferencing an offset of the pointer to the memory that you want to free)
-
- I can imagine a memory allocation scheme that would allow this, but that wasn't
- my point. I was merely saying the call to "free" itself wasn't technically
- illegal, although "free" undoubtedly somewhere in its internals would try to
- dereference the pointer and thereby cause an error. I expressed surprise that
- "Purify" attributed the error on the call to "free", rather than report the
- error as occuring at some offset within "free" itself. Someone pointed out to
- me that since source was probably not available for "free", perhaps "Purify"
- simply attributed the error to the call. I could buy this. I suspect instead
- that the error was reported at the point of call because Purify "knows" that
- "free" will try to dereference the pointer. I guess what I'd like to know is,
- if you replaced "free" in the example with some other function, one which did
- not in fact ever try to dereference the pointer, would "Purify" still complain
- that a bad pointer was being referenced?
-
- --
- Marc Sabatella
- marc@hpmonk.fc.hp.com
- --
- Amendment 2 Is Legalized Discrimination - Shame On You, Colorado
- --
- "Neither the State of Colorado ... nor any of its municipalities ... shall ...
- enforce any ... ordinance ... whereby homosexual, lesbian, or bisexual
- orientation ... shall ... be the basis of ... any ... claim of discrimination"
- --
- All opinions expressed herein are my personal ones
- and do not necessarily reflect those of HP or anyone else.
-