From 4727377349467840802
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,176c9dc06a6729eb
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2002-03-26 14:34:06 PST
Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: "Ken Alverson" <Ken@Alverson.com>
Newsgroups: comp.std.c++
Subject: Re: why doesn't delete NULL the pointer?
Date: Tue, 26 Mar 2002 22:33:38 GMT
Organization: Case Western Reserve University, Cleveland, OH, USA
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <a7qsk8$81n$1@eeyore.INS.cwru.edu>
References: <a7j7vg$78s$1@watserv3.uwaterloo.ca> <3C9DD892.94860335@acm.org> <a7lhfq$co1$1@eeyore.INS.cwru.edu> <3C9E5921.735FEB25@acm.org> <a7mi76$1bl$1@eeyore.INS.cwru.edu> <3CA063FF.3C2EE83A@acm.org>
X-Trace: mail2news.demon.co.uk 1017182022 mail2news:7960 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
NNTP-Posting-Date: 26 Mar 2002 22:27:20 GMT
NNTP-Posting-User: kla4@dsl-65-186-37-105.telocity.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Lines: 36
Xref: archiver1.google.com comp.std.c++:10213

"Pete Becker" <petebecker@acm.org> wrote in message
news:3CA063FF.3C2EE83A@acm.org...
> Ken Alverson wrote:
> >
> > That's like saying (for example) a compiler that supports checking the
stack
> > for corruption is more dangerous than one that does not, because people
will
> > stop worrying about buffer overflows, instead relying on the compiler to
> > catch them.
> >
>
> I don't see how. But since you haven't mentioned how you reached this
> conclusion it's not possible to see where your reasoning went astray.

I thought the analogy was pretty clear.  The stack checking compiler doesn't
catch all stack errors, but it does catch a certain class of stack errors
(those that overwrite the return address area, generally).  The pointer
nulling compiler doesn't catch all stale pointer errors, but it does catch a
certain class of stale pointer errors (those that use the same instance of
the pointer that was deleted).

Either case may cause a certain portion of the programmer population to rely
on the feature and thereby introduce more errors, but the vast majority will
continue in the manner they previously were and have less errors because the
compiler is catching mistakes.

Ken


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



