🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c++
Article #99

Re: Is the STL too authentic... ?

#99
From: James Kanze US/ESC 60/3/141 #407...
Date: Thu, 05 Oct 1995 11:17
35 lines
2354 bytes
In article <DFxJ75.3w0@research.att.com> ark@research.att.com (Andrew
Koenig) writes:

|> In article <5vE-N3F6nTB@site71.ping.at> wsog@site71.ping.at (Walter Sommergruber) writes:

|> > > A core dump in that context is neither better nor worse than any
|> > > other kind of run-time trap that prevents the program from yielding a
|> > > result. --

|> > Do you really think so ? What will your customers say about a program that
|> > crashes with a core dump ? I think most of them prefer a program where
|> > they get a message "Sorry, internal error. Contact ...." or (in the case
|> > the error is not severe) a program that makes another try.

|> Every system I've ever seen provides a way to do just that,
|> usually by calling signal() or something like it.

It occurs to me that the real problem without bounds checking isn't
when it core dumps.  As Andy points out, in many cases there are ways
of making the core dump no worse than a bounds check error.

The real problem is when it doesn't.  So you read beyond the end of
the array.  In many cases, particularly those involving built-in
types, this *won't* core dump.  On the other hand, it is highly
unlikely that the value you read will give the correct results.

In such cases, a core dump or a bounds check error might actually be
preferable.  With bounds checking, the error is guaranteed.  Without,
you might, and then again, you might not.  There's nothing quite like
non-reproduceable behavior for programmer job security.
-- 
James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                              -- Beratung in industrieller Datenverarbeitung
Technical Details
Message-ID: <KANZE.95Oct5121708@slsvgqt.lts.sel.alcatel.de>
Path: arc1-ca.pugleaf.net!xlink.net!slsv6bt!news
References: <44romb$lsf@nz12.rz.uni-karlsruhe.de> <DFwJu1.w9@research.att.com> <5vE-N3F6nTB@site71.ping.at> <DFxJ75.3w0@research.att.com>

Show Full Headers
Complete Article Headers
Newsgroups: de.comp.lang.c++,comp.lang.c++
Path: arc1-ca.pugleaf.net!xlink.net!slsv6bt!news
From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
Subject: Re: Is the STL too authentic... ?
In-Reply-To: ark@research.att.com's message of Wed, 4 Oct 1995 15:04:17 GMT
Message-ID: <KANZE.95Oct5121708@slsvgqt.lts.sel.alcatel.de>
Sender: news@lts.sel.alcatel.de
Organization: SEL
References: <44romb$lsf@nz12.rz.uni-karlsruhe.de> <DFwJu1.w9@research.att.com>
 <5vE-N3F6nTB@site71.ping.at> <DFxJ75.3w0@research.att.com>
Date: 05 Oct 1995 11:17:08 GMT