qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit a67ffa423cc859ac5093337e26af9c87af4631f6
parent 337b10f6edc4d56cbf126255b3e63e6e0b7c8530
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Tue, 22 Mar 2016 12:16:03 -0400

check for overflow in ssa.c (abi fuzzer)

Diffstat:
Mlisc/lisc.h | 2+-
Mlisc/ssa.c | 2++
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisc/lisc.h b/lisc/lisc.h @@ -77,7 +77,7 @@ enum Reg { enum { NString = 32, - NPred = 15, + NPred = 63, NIns = 8192, NAlign = 3, NSeg = 32, diff --git a/lisc/ssa.c b/lisc/ssa.c @@ -464,6 +464,8 @@ renblk(Blk *b, Name **stk, Fn *fn) t = p->to.val; if ((t=fn->tmp[t].visit)) { m = p->narg++; + if (m == NPred) + diag("ssa: too many phi arguments"); p->arg[m] = getstk(t, b, stk); p->blk[m] = b; }