From: sater Date: Thu, 28 Jun 1984 10:40:09 +0000 (+0000) Subject: Fixed bug: after BRA instruction was optimized away the variable lastbra X-Git-Tag: release-5-5~6240 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e30825a5dd339da06bb857559cb34ada233668f6;p=ack.git Fixed bug: after BRA instruction was optimized away the variable lastbra pointed to the instruction following. This could lead to anything, including bus errors. Lastbra is now reset to 0. Bug discovered at Philips PMDS by Hans de Vries. The fix is also his. Actually the function cleaninstr should be rewritten. --- diff --git a/util/opt/flow.c b/util/opt/flow.c index 2f7d79add..b83c39bd9 100644 --- a/util/opt/flow.c +++ b/util/opt/flow.c @@ -97,6 +97,7 @@ cleaninstrs() { OPTIM(O_BRALAB); lpp = lastbra; *lpp = lp; + lastbra = (line_p *) 0; lp->l_a.la_np->n_jumps--; } }