Skip to content

Commit

Permalink
disallow phi nodes in the start block
Browse files Browse the repository at this point in the history
AFL found this bug.
  • Loading branch information
Quentin Carbonneaux committed Apr 20, 2016
1 parent 84bb28c commit bbf9006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit bbf9006

Please sign in to comment.