Article View: comp.sources.bugs
Article #2286RN crash (Patchlevel 40)
From: Jinfu Chen
Date: Tue, 19 Dec 1989 00:26
Date: Tue, 19 Dec 1989 00:26
63 lines
2889 bytes
2889 bytes
I don't know where to send bug report of rn and I believe this bug
was reported a few months ago already in this group but failed to
show up in patches:
Version: 4.3, patchlevel 40
Output of 'v' in rn: @(#)$Header: rn.c,v 4.3.1.4 85/09/10 11:05:13 lwall Exp $
Description: When news article files have file mode 775, the program crashed with
an IOT trap when moving to news group mode:
panda<63 chen>% rn (and hit 'y' to enter a group)
IOT trap
panda<64 chen>% tb -l ( Apollo's adb equivalent, sort-off )
Process 2338 (parent 1357, group 2338)
Time 89/12/18.17:04(MST)
Program //node_9f51/usr/local/bin/rn
Status 09010006: IOT instruction fault (UNIX/signal)
In routine "kill" line 84
Called from "abort" line 47
Called from "finalize" line 65
Called from "pfm_$fault" line 2309
Called from diagnostic frame (00120011) access violation (OS/fault handler)
Called from "_doprnt" line 227
Called from "printf" line 53
Called from "do_newsgroup" line 405
Called from "main" line 473
Called from "unix_$main" line 114
Called from "_start" line 51
Called from "PM_$CALL" line 176
Called from "pgm_$load_run" line 891
Called from "pgm_$invoke_uid_pn" line 1112
Cause: The order of evaluation in art.c line 107 is wrong ( '!=' has high
priority than '&' )
Fix: Add parentthesis around the bitwise pair before comparing:
*** art.c Mon Dec 18 17:14:27 1989
--- art.c.orig Mon Dec 18 17:14:04 1989
***************
*** 104,110 ****
if (fstat(artfp->_file,&filestat))
/* get article file stats */
return DA_CLEAN;
! if ((filestat.st_mode & S_IFMT) != S_IFREG)
return DA_NORM;
artsize = filestat.st_size;
/* from that get article size */
--- 104,110 ----
if (fstat(artfp->_file,&filestat))
/* get article file stats */
return DA_CLEAN;
! if (filestat.st_mode & S_IFMT != S_IFREG)
return DA_NORM;
artsize = filestat.st_size;
/* from that get article size */
--
Jinfu Chen (602)898-5338 | Disclaimer:
Motorola, Inc. Logic IC Div., Mesa, AZ |
...{somewhere}!uunet!dover!digital!chen | My employer doesn't pay
chen@digital.sps.mot.com | me to express opinions.
----------
Technical Details
Message-ID:
<47822a5b.81da@digital.sps.mot.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!uwm.edu!psuvax1!rutgers!mephisto!ncar!asuvax!mcdphx!dover!digital!chen@digital.sps.MOT.COMShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!aplcen!uakari.primate.wisc.edu!uwm.edu!psuvax1!rutgers!mephisto!ncar!asuvax!mcdphx!dover!digital!chen@digital.sps.MOT.COM From: chen@digital.sps.MOT.COM (Jinfu Chen) Newsgroups: comp.sources.bugs Subject: RN crash (Patchlevel 40) Message-ID: <47822a5b.81da@digital.sps.mot.com> Date: 19 Dec 89 00:26:31 GMT Sender: chen@digital.sps.mot.com Reply-To: chen@digital.sps.MOT.COM (Jinfu Chen) Organization: Motorola, Inc. Logic IC Div, Mesa, AZ Lines: 63