Browse Source

disallow phi nodes in the start block

AFL found this bug.
Quentin Carbonneaux 9 years ago
parent
commit
bbf90069b3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      parse.c

+ 1 - 1
parse.c

@@ -578,7 +578,7 @@ parseline(PState ps)
 	op = next();
 DoOp:
 	if (op == Tphi) {
-		if (ps != PPhi)
+		if (ps != PPhi || curb == curf->start)
 			err("unexpected phi instruction");
 		op = -1;
 	}