Просмотр исходного кода

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.

sater 40 лет назад
Родитель
Сommit
f3f3069f54
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      util/opt/flow.c

+ 1 - 0
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--;
 				}
 			}