From: sthen Date: Fri, 10 Jan 2014 11:19:31 +0000 (+0000) Subject: revert previous; height is never changed, but top is changed. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b58644ae2f55ff897072a5475a88f543ae46fcda;p=openbsd revert previous; height is never changed, but top is changed. ok espie@ who saw intermittent sigbus in ports/math/hc with this. --- diff --git a/usr.bin/yacc/lalr.c b/usr.bin/yacc/lalr.c index acd25cff4f0..f74539fec98 100644 --- a/usr.bin/yacc/lalr.c +++ b/usr.bin/yacc/lalr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lalr.c,v 1.13 2014/01/09 23:07:50 millert Exp $ */ +/* $OpenBSD: lalr.c,v 1.14 2014/01/10 11:19:31 sthen Exp $ */ /* $NetBSD: lalr.c,v 1.4 1996/03/19 03:21:33 jtc Exp $ */ /* @@ -629,10 +629,12 @@ traverse(int i) unsigned *fp3; int j; short *rp; + + int height; unsigned *base; VERTICES[++top] = i; - INDEX[i] = top; + INDEX[i] = height = top; base = F + i * tokensetsize; fp3 = base + tokensetsize; @@ -656,7 +658,7 @@ traverse(int i) } } - if (INDEX[i] == top) + if (INDEX[i] == height) { for (;;) {