From 3ee14471e10ca83fe96b7ee1d80a67a1f8c7f4ec Mon Sep 17 00:00:00 2001 From: Alexey Semenyuk Date: Wed, 21 May 2025 21:56:41 +0000 Subject: [PATCH] 8357503: gcbasher fails with java.lang.IllegalArgumentException: Unknown constant pool type Reviewed-by: dholmes --- test/hotspot/jtreg/gc/stress/gcbasher/Decompiler.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/hotspot/jtreg/gc/stress/gcbasher/Decompiler.java b/test/hotspot/jtreg/gc/stress/gcbasher/Decompiler.java index a6b399bc013..446d9398d14 100644 --- a/test/hotspot/jtreg/gc/stress/gcbasher/Decompiler.java +++ b/test/hotspot/jtreg/gc/stress/gcbasher/Decompiler.java @@ -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