Mercurial > hg > graal-jvmci-8
changeset 23756:d64936a16a13
Disallow too large bci in BytecodePosition
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Wed, 21 Sep 2016 20:08:53 -0700 |
parents | 37a27e859428 |
children | aaed278a9cf1 |
files | jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java Wed Sep 21 19:37:02 2016 -0700 +++ b/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/BytecodePosition.java Wed Sep 21 20:08:53 2016 -0700 @@ -50,6 +50,9 @@ this.caller = caller; this.method = method; this.bci = bci; + if (bci >= method.getCodeSize()) { + throw new IllegalArgumentException(); + } } /**