From e30825a5dd339da06bb857559cb34ada233668f6 Mon Sep 17 00:00:00 2001 From: sater Date: Thu, 28 Jun 1984 10:40:09 +0000 Subject: [PATCH] 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. --- util/opt/flow.c | 1 + 1 file changed, 1 insertion(+) 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--; } } -- 2.34.1