Hi Gary,

Aren't you just hiding a potential jvmti bug with this change? If you think this is a test bug and this is a proper fix, I'd like to see an explanation of how the test is causing the crash. The explanation would need to involve native code, since pure java should never crash.

thanks,

Chris

On 9/27/18 5:18 AM, Gary Adams wrote:
I've been unsuccessful trying to reproduce the failure in hs201t002.

  Issue: https://bugs.openjdk.java.net/browse/JDK-8203350

Colleen made a comment on the bug that the reference
from hs201t002a to class hs201t002 might be an issue
for the redefined class.

I found in test hs201t001 that an intentional reference
before entering hs201t001a.doInit() is made to avoid
that classloader operation.

It's not clear to me why that was done, but the same workaround
could be used in hs201t002a, if it would make the test more robust.


diff --git a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/newclass/hs201t002a.java b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/newclass/hs201t002a.java --- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/newclass/hs201t002a.java +++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/newclass/hs201t002a.java
@@ -26,6 +26,7 @@
 public class hs201t002a extends Exception {

     public hs201t002a () {
+        System.out.println("Current step: " + hs201t002.currentStep); // Avoid calling classloader to find hs201t002 in doInit()
         doInit();
     }



Reply via email to