Article View: gnu.epoch.misc
Article #1224Bug in Epoch-4.0p2
From: Dave Detlefs
Date: Fri, 17 Jul 1992 18:10
Date: Fri, 17 Jul 1992 18:10
39 lines
1678 bytes
1678 bytes
I've been using epoch-4.0p2, with happiness about the neat features,
but a little disapointment with the reliability: it was crashing on me
a few times a day. I finally summoned the gumption to investigate one
of the core files, and found what seems to be a clear bug in button.c.
The function PlotTextLine, which begins on line 1574, defines
char buf[1000]; /* Buffer for constructing string. */
char *pos; /* Position in buf */
and later says
pos = buf;
a few lines later, at 1604, we have
if (cb->style == s && n < 9999)
{
*pos++ = cb->ch;
The number 9999 should be, I believe 999. The value of n in the core
file I investigated was 1019, and the argument 'w' had been
overwritten, causing an unaligned access. More succinctly, the diffs
are:
1604c1604
< if (cb->style == s && n < 999)
---
> if (cb->style == s && n < 9999)
The main research effort I'm involved with is trying to, among other
things, prove the absence of array bounds errors at compile time (for
Modula-3). I will save this one as a good example :-)
Hope this helps. Keep up the great work!
Dave
Technical Details
Message-ID:
<1992Jul17.181059.18295@src.dec.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!pa.dec.com!src.dec.com!detlefsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc7ee,1a717530bb66befe,start X-Google-Attributes: gidfc7ee,public X-Google-ArrivalTime: 1992-07-17 04:41:28 PST Newsgroups: gnu.epoch.misc Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!pa.dec.com!src.dec.com!detlefs From: detlefs@src.dec.com (Dave Detlefs) Subject: Bug in Epoch-4.0p2 Message-ID: <1992Jul17.181059.18295@src.dec.com> Sender: news@src.dec.com (News) Organization: DEC Systems Research Center Distribution: gnu Date: Fri, 17 Jul 92 18:10:59 GMT Lines: 41