mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
30 lines
1.2 KiB
Diff
30 lines
1.2 KiB
Diff
From 960dafbeeba190911955c208b611fecc15d66738 Mon Sep 17 00:00:00 2001
|
|
From: Vladimir Dvorak <vladimir.dvorak@jetbrains.com>
|
|
Date: Wed, 11 Mar 2020 14:19:34 +0100
|
|
Subject: [PATCH 03/34] Fix class cast exception on redefinition of class A,
|
|
that is superclass of B that has anonymous class C
|
|
|
|
---
|
|
src/hotspot/share/oops/instanceKlass.cpp | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/hotspot/share/oops/instanceKlass.cpp b/src/hotspot/share/oops/instanceKlass.cpp
|
|
index 994fc8a3bc8..3be3a09ef8f 100644
|
|
--- a/src/hotspot/share/oops/instanceKlass.cpp
|
|
+++ b/src/hotspot/share/oops/instanceKlass.cpp
|
|
@@ -953,7 +953,10 @@ bool InstanceKlass::link_class_impl(TRAPS) {
|
|
|
|
if (!is_linked()) {
|
|
if (!is_rewritten()) {
|
|
- {
|
|
+ // (DCEVM): If class A is being redefined and class B->A (B is extended from A) and B is host class of anonymous class C
|
|
+ // then second redefinition fails with cannot cast klass exception. So we currently turn off bytecode verification
|
|
+ // on redefinition.
|
|
+ if (!AllowEnhancedClassRedefinition || !newest_version()->is_redefining()) {
|
|
bool verify_ok = verify_code(THREAD);
|
|
if (!verify_ok) {
|
|
return false;
|
|
--
|
|
2.23.0
|
|
|