8357503: gcbasher fails with java.lang.IllegalArgumentException: Unknown constant pool type

Reviewed-by: dholmes
This commit is contained in:
Alexey Semenyuk 2025-05-21 21:56:41 +00:00
parent 4d7068923c
commit 3ee14471e1

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -258,6 +258,7 @@ class Decompiler {
final int CONSTANT_NameAndType = 12;
final int CONSTANT_MethodHandle = 15;
final int CONSTANT_MethodType = 16;
final int CONSTANT_Dynamic = 17;
final int CONSTANT_InvokeDynamic = 18;
ConstantPoolEntry[] constantPool = new ConstantPoolEntry[cursor.readUnsignedShort()];
@ -319,6 +320,11 @@ class Decompiler {
cursor.readUnsignedShort(); // descriptor_index
break;
case CONSTANT_Dynamic:
cursor.readUnsignedShort(); // bootstrap_method_attr_index
cursor.readUnsignedShort(); // name_and_type_index
break;
case CONSTANT_InvokeDynamic:
cursor.readUnsignedShort(); // bootstrap_method_attr_index
cursor.readUnsignedShort(); // name_and_type_index