Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b05
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8282456 | 17.0.3 | Severin Gehwolf | P4 | Resolved | Fixed | b04 |
JDK-8282457 | 11.0.15 | Severin Gehwolf | P4 | Resolved | Fixed | b04 |
JDK-8283178 | openjdk8u342 | Severin Gehwolf | P4 | Resolved | Fixed | b01 |
Description
https://github.com/openjdk/jdk/pull/6652
Condition is obviously wrong, because if name starts with "java." other 2 conditions are always true. Intent, as I understand it, was to redefine class where debug event took place (in case of test classes), unless it took place in class of jdk itself, in which case redefine test's main class (if redefineAtEvents is true of course). Check for class names starting with "jdk." was added with later commit [1], not touching that wrong condition (check for classes belonging to jdk) and putting check to else branch instead (therefore not doing any redefinition in case name starts with "jdk.").
Actually fix is done to be then backported to jdk8u, where com/sun/jdi/RedefineCrossEvent.java test stared failing after recent backport [2], due to missing check for classes starting with "jdk." [3]:
...
Redefining class jdk.internal.misc.TerminatingThreadLocal (no class loader)
FAIL: redefine - unexpected exception: java.io.FileNotFoundException: /home/tester/test.1638289866/jdk/JTwork/classes/com/sun/jdi/jdk/internal/misc/TerminatingThreadLocal.class (No such file or directory)
...
This test actually passes for (latest) jdk. However fixing this condition before doing backport, rather than backporting it in current form seems like right thing to do. I tested this locally and jdi tests are passing with this change for latest jdk (and also for jdk8u).
[1] https://github.com/zzambers/jdk/commit/426873751c710061d0f9bc713a0de47373e51418#diff-778880449f85966d3c6b219b8ceb41fdbbe7acc5e520d2aa27aada3f33bf1eab
[2] https://bugs.openjdk.java.net/browse/JDK-8273772
[3] https://github.com/openjdk/jdk8u/blob/7d3c0bede34930cadd76644e58bf56f2a83c3d01/jdk/test/com/sun/jdi/TestScaffold.java#L535
Attachments
Issue Links
- backported by
-
JDK-8282456 test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition
- Resolved
-
JDK-8282457 test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition
- Resolved
-
JDK-8283178 test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition
- Resolved
- relates to
-
JDK-8206330 Revisit com/sun/jdi/RedefineCrossEvent.java
- Resolved
- links to
-
Commit openjdk/jdk8u-dev/b5bcf6c2
-
Commit openjdk/jdk11u-dev/80919eb2
-
Commit openjdk/jdk17u-dev/c2a62d74
-
Commit openjdk/jdk/4c52eb39
-
Review openjdk/jdk8u-dev/6
-
Review openjdk/jdk11u-dev/837
-
Review openjdk/jdk17u-dev/175
-
Review openjdk/jdk/6652