diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-22 12:16:03 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-22 12:16:09 -0400 |
commit | a67ffa423cc859ac5093337e26af9c87af4631f6 (patch) | |
tree | 3f136f899f59ee2a465f9c8c57d3a143a6a7f226 | |
parent | 337b10f6edc4d56cbf126255b3e63e6e0b7c8530 (diff) | |
download | roux-a67ffa423cc859ac5093337e26af9c87af4631f6.tar.gz |
check for overflow in ssa.c (abi fuzzer)
-rw-r--r-- | lisc/lisc.h | 2 | ||||
-rw-r--r-- | lisc/ssa.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lisc/lisc.h b/lisc/lisc.h index 41be0ad..a57a984 100644 --- 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 index 269406b..7ccd944 100644 --- 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; } |