8195060: vm/mlvm/anonloader/stress/byteMutation intermittently times out
authoriignatyev
Wed, 13 Feb 2019 11:18:14 -0800
changeset 53744 5b78f051912b
parent 53743 0076e23f333f
child 53745 a535ba736cab
8195060: vm/mlvm/anonloader/stress/byteMutation intermittently times out Reviewed-by: kvn
test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/share/StressClassLoadingTest.java
--- a/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/share/StressClassLoadingTest.java	Wed Feb 13 11:08:51 2019 -0800
+++ b/test/hotspot/jtreg/vmTestbase/vm/mlvm/anonloader/share/StressClassLoadingTest.java	Wed Feb 13 11:18:14 2019 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2019, 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
@@ -169,7 +169,7 @@
                             c = CustomClassLoaders.makeClassBytesLoader(classBytes, className)
                                     .loadClass(className);
                         }
-                        c.newInstance();
+                        UnsafeAccess.unsafe.ensureClassInitialized(c);
                     } catch (Throwable e) {
                         Env.traceVerbose(e, "parser caught exception");
                     }