delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/14/00:18:12

From: invalid AT erehwon DOT invalid (Graaagh the Mighty)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Need help with very nasty bug
Organization: Low Charisma Anonymous
Message-ID: <3b4fbf4d.165926315@news.primus.ca>
References: <9ii9h3$r9om$1 AT reader03 DOT wxs DOT nl> <9iihco$bmm$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
X-Newsreader: Forte Free Agent 1.11/32.235
Lines: 31
Date: Sat, 14 Jul 2001 03:44:28 GMT
NNTP-Posting-Host: 207.176.153.27
X-Complaints-To: news AT primus DOT ca
X-Trace: news1.tor.primus.ca 995082119 207.176.153.27 (Fri, 13 Jul 2001 23:41:59 EDT)
NNTP-Posting-Date: Fri, 13 Jul 2001 23:41:59 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 11 Jul 2001 21:44:56 GMT, Hans-Bernhard Broeker
<broeker AT physik DOT rwth-aachen DOT de> sat on a tribble, which squeaked:

>jansb000 <jansb000 AT wxs DOT nl> wrote:
>[...]
>
>> Recently I added the line "ULONG spr" and to my suprise the application that
>> I spoke about doesn't work any more. 
>
>You'll really have to be a bit more specific: how does it "not work", now?
>What are the symptoms of the problem?

Actually, much can be deduced without more info. All he changed was
the object layout and the program broke. Ergo, its behavior has a
dependency on object layout, which is bad. Most probably, this came
from one of three causes:

* A bug involving uninitialized memory or pointer wildness; the
  program happened to always work before the spr was added perhaps
  because a padding zero was there before, or another field.
* The code was unwisely depending on fields of the object being at
  certain hardcoded offsets in bytes, rather than using offsetof.
* The code was unwisely writing out and reading the objects
  byte-by-byte to and from binary files, and so the object format
  changed when the spr field was added, making the program choke on
  earlier versions' files.
-- 
Bill Gates: "No computer will ever need more than 640K of RAM." -- 1980
"There's nobody getting rich writing software that I know of." -- 1980
"This antitrust thing will blow over." -- 1998
Combine neo, an underscore, and one thousand sixty-one to make my hotmail addy.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019