8195060: vm/mlvm/anonloader/stress/byteMutation intermittently times out
Reviewed-by: kvn
--- 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");
}