Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!rivm!ccea3 From: ccea3@rivm.UUCP (Adri Verhoef) Newsgroups: news.software.b Subject: Re: News 2.11.18 problem on Ultrix Summary: >Subject: inews B 2.11.17 trashes articles, core dumps +FIX Keywords: Ultrix 3.0 Xenix/68000 System III (Tandy Xenix 3.2) Message-ID: <1462@rivm05.UUCP> Date: 20 Sep 89 09:56:20 GMT References: <11853@polya.Stanford.EDU> Reply-To: ccea3@rivm05.UUCP (Adri Verhoef) Organization: RIVM, Bilthoven, The Netherlands Lines: 82 Joe Weening wants to reverse the bug fix of Gordon Burditt... weening@Polya.Stanford.EDU (Joe Weening) writes: >After I installed patch 18 to B news 2.11 on an Ultrix 3.0 system, >rnews no longer succeeded in unbatching articles. For each batch, >a bunch of the following messages appeared in log and errlog: > >Sep 19 13:55 news inews: : Inbound news is garbled > >and no articles were posted. The culprit seems to be the following >change in ifuncs.c. Removing it made things work again. > >*** 1400,1402 > freopen(tfilename, "r", infp); >! (void) free(cp); > return; /* from checkbatch as if > >--- 1453,1456 ----- > freopen(tfilename, "r", infp); >! setbuf(infp, (char *) NULL); >! (void) free(cp); > return; /* from checkbatch as if *but* from an article that Gordon Burditt wrote: >From: gordon@sneaky.TANDY.COM (Gordon Burditt) >Newsgroups: news.software.b >Subject: inews B 2.11.17 trashes articles, core dumps +FIX >Keywords: inews >Message-ID: <7797@sneaky.TANDY.COM> >Date: 23 Feb 89 08:08:39 GMT >Organization: Gordon Burditt >Lines: 38 > >Index: B news 2.11.17 src/ifuncs.c > >Since patch 15-17 (singular intended) indicated that there would be no >more official patches, I'm posting this here. > >Description: Under at least some implementations of stdio, inews trashes > articles, generates spurious "linecount expected 55, got 287" messages > on almost every article, and core dumps occasionally due to a trashed > malloc free list. >Repeat-by: On Xenix/68000 System III (Tandy Xenix 3.2), feed a batch of > news (compressed or not) into inews. Observe articles with the > same chunk repeated many times, core files, and linecount expected > messages in the log. >Fix: Tell stdio to quit using the buffer supplied for infp before free()ing > it. Apply the following patch. > >*** ifuncs.c Feb 23 01:46:00 1989 >--- ifuncs.c.new Feb 23 01:46:13 1989 >*************** >*** 1398,1404 > } else /* supstitute temp file as > * input */ > freopen(tfilename, "r", infp); >! (void) free(cp); > return; /* from checkbatch as if > * normal article */ > } > >--- 1398,1406 ----- > } else /* supstitute temp file as > * input */ > freopen(tfilename, "r", infp); >! /*quit using buffer before freeing it*/ >! setbuf(infp, (char *) NULL); >! (void) free(cp); > return; /* from checkbatch as if > * normal article */ > } > Probably both of these people stand in their right. I haven't tested B2.11.18 yet on Uniq System V.3.0, I'm still running B2.11.14. -- Adri Verhoef (uunet!rivm!a3), site administrator of the National Institute for Public Health and Environmental Protection (RIVM).