Article View: comp.bugs.4bsd
Article #1207Re: Portable C Compiler Bug
From: Chris Torek
Date: Fri, 07 Oct 1988 18:57
Date: Fri, 07 Oct 1988 18:57
57 lines
1891 bytes
1891 bytes
In article <2737@uvacs.cs.Virginia.EDU> amh@uvacs.cs.Virginia.EDU
(Anne M. Holler) writes:
>...3. The bug causes the compiler to sometimes fail giving the error
>message "schain botch".
Yes. Anne's fix should work. The bug is already fixed in
4.3BSD-tahoe; here is the `official' fix. Your line numbers will
differ.
***************
*** 1854,1859 ****
/* step 1: remove entries */
while( chaintop-1 > lev ){
- register int type;
-
p = schain[--chaintop];
schain[chaintop] = 0;
--- 1890,1893 ----
***************
*** 1860,1864 ****
for( ; p; p = q ){
q = p->snext;
- type = p->stype;
if( p->stype == TNULL || p->slevel <= lev )
cerror( "schain botch" );
--- 1894,1897 ----
***************
*** 1894,1898 ****
p = clist;
while( p ){
! register struct symtab *r, *next;
q = p;
--- 1927,1931 ----
p = clist;
while( p ){
! register struct symtab *next, **t, *r;
q = p;
***************
*** 1902,1905 ****
--- 1935,1946 ----
if( q == p || q->stype == TNULL )break;
if( (r = relook(q)) != q ) {
+ /* move q in schain list */
+ t = &schain[q->slevel];
+ while( *t && *t != q )
+ t = &(*t)->snext;
+ if( *t )
+ *t = r;
+ else
+ cerror("schain botch 2");
*r = *q;
q->stype = TNULL;
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris
Technical Details
Message-ID:
<13902@mimsy.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!mimsy!chrisReferences:
<2737@uvacs.cs.Virginia.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.bugs.4bsd Subject: Re: Portable C Compiler Bug Message-ID: <13902@mimsy.UUCP> Date: 7 Oct 88 18:57:40 GMT References: <2737@uvacs.cs.Virginia.EDU> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 57