[8u] RFR 8155951 & 8151066
Andrew John Hughes
gnu.andrew at redhat.com
Tue Sep 3 03:30:05 UTC 2019
On 13/08/2019 19:13, Zhengyu Gu wrote:
> Please review following backports:
>
> 8155951: VM crash in nsk/jvmti/RedefineClasses/StressRedefine: assert
> failed: Corrupted constant pool
> https://bugs.openjdk.java.net/browse/JDK-8155951
>
> 8151066: assert(0 <= i && i < length()) failed: index out of bounds
> https://bugs.openjdk.java.net/browse/JDK-8151066
>
> Original jdk9 patch contains both fixes and they are all on Oracle 8u
> backport list.
>
> The patch does not apply cleanly. Other than a few minor conflicts, e.g.
> copyright years, breaking single line long parameter list to multi-lines
> and line shifts, jdk8u lock declaration (def macro in mutexLocker.cpp)
> does not take 5th argument.
>
> JDK9 code review thread:
> https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2016-May/019476.html
>
>
> 8u backport:
> http://cr.openjdk.java.net/~zgu/JDK-8155951-8u/webrev.00/index.html
>
> Thanks,
>
> -Zhengyu
This looks ok.
FWIW, the SafepointCheckRequired enum (of which
Monitor::_safepoint_check_always is one value) is introduced by
JDK-8047290 [0]. The flag results in asserts in debug builds if the
runtime behaviour does not match the designated behaviour.
That one may be worth considering for backport at some point, but
there's no issue with leaving the argument out here because, not only
does the argument not exist, but neither does the value or the variable
in Monitor:
+ // Locks can be acquired with or without safepoint check.
+ // Monitor::lock and Monitor::lock_without_safepoint_check
+ // checks these flags when acquiring a lock to ensure
+ // consistent checking for each lock.
+ // A few existing locks will sometimes have a safepoint check and
+ // sometimes not, but these locks are set up in such a way to avoid
deadlocks.
+ enum SafepointCheckRequired {
+ _safepoint_check_never, // Monitors with this value will
cause errors
+ // when acquired with a safepoint check.
+ _safepoint_check_sometimes, // Certain locks are called sometimes
with and
+ // sometimes without safepoint
checks. These
+ // locks will not produce errors when
locked.
+ _safepoint_check_always // Causes error if locked without a
safepoint
+ // check.
+ };
+
+ NOT_PRODUCT(SafepointCheckRequired _safepoint_check_required;)
+
[0] https://bugs.openjdk.java.net/browse/JDK-8047290
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list