mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
6870851: Bad frame_chop in StackMapTable crashes JVM
Must check locals for null when processing chop frame Reviewed-by: dholmes, dcubed
This commit is contained in:
parent
5d5bcb4bca
commit
c5ccd42ac0
1 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -152,6 +152,7 @@ void StackMapTable::print() const {
|
||||||
|
|
||||||
int32_t StackMapReader::chop(
|
int32_t StackMapReader::chop(
|
||||||
VerificationType* locals, int32_t length, int32_t chops) {
|
VerificationType* locals, int32_t length, int32_t chops) {
|
||||||
|
if (locals == NULL) return -1;
|
||||||
int32_t pos = length - 1;
|
int32_t pos = length - 1;
|
||||||
for (int32_t i=0; i<chops; i++) {
|
for (int32_t i=0; i<chops; i++) {
|
||||||
if (locals[pos].is_category2_2nd()) {
|
if (locals[pos].is_category2_2nd()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue