summary refs log tree commit diff
path: root/parse.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-20 14:03:38 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-20 14:03:38 -0400
commitbbf90069b3aed188ee1d2a7e5fb83ce93bce51be (patch)
treec8dd3403efecea469e0bd85424362630958408d8 /parse.c
parent84bb28c0422c2d0dea555aeec946e73cf2b818a8 (diff)
downloadroux-bbf90069b3aed188ee1d2a7e5fb83ce93bce51be.tar.gz
disallow phi nodes in the start block
AFL found this bug.
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index ed88114..a06d5b9 100644
--- a/parse.c
+++ b/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;
 	}