🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #966

Re: C Pointers (was: Relationship between C and C++)

#966
From: Jim Miller
Date: Thu, 22 Mar 1990 22:34
29 lines
1516 bytes
>I believe the whole thing can be illustrated with one example.  I was 
>writing a client as a programming assignment just yesterday, and I ran into
>a strange bug.  A variable I though was limited 0..4 was very occasionaly
>getting values in the 10,000's.
>
>P.S.  For the guy who wanted bug stories, here's mine.
>
>Randy

Here's one of mine.

A user's program was bombing, but when using the debugger, it went away.
So I, debugger writer, was called in, it was clearly the languages fault.

The problem, it turned out, was in the one routine that the user had turned
checking off -- they claimed they NEVER turned checking off. 

It took me 2 days to find the truth, oh well.

They had an off-by-1 problem with an array index.  The debugger, using the
stack, changed the garbage on the stack enough so that it ran fine when
run with the debugger. 

The language was BASIC.  Clearly a good reason to avoid BASIC.

An even better reason to not ever trust the customer to tell the truth, the
whole truth and nothing but the truth :-)

   jim - nothing but the facts - miller
Technical Details
Message-ID: <6000005@hpcupt1.HP.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcupt1!jamiller
References: <14823@pur-ee.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcupt1!jamiller
From: jamiller@hpcupt1.HP.COM (Jim Miller)
Newsgroups: comp.lang.misc
Subject: Re: C Pointers (was: Relationship between C and C++)
Message-ID: <6000005@hpcupt1.HP.COM>
Date: 22 Mar 90 22:34:50 GMT
References: <14823@pur-ee.UUCP>
Organization: Hewlett Packard, Cupertino
Lines: 29