changeset 52579:6cd1ee2b4fa1

8210861: Move assert to help diagnose rare RedefineStress crash Summary: assert that Method being marked on stack hasn't been missed by previous metadata walk Reviewed-by: lfoltan
author coleenp
date Tue, 18 Sep 2018 16:11:36 -0400
parents d0dfb9775c08
children 4129f43607cb
files src/hotspot/share/oops/method.cpp test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/StressRedefineWithoutBytecodeCorruption/TestDescription.java
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/oops/method.cpp	Tue Sep 18 22:32:25 2018 +0200
+++ b/src/hotspot/share/oops/method.cpp	Tue Sep 18 16:11:36 2018 -0400
@@ -2152,6 +2152,8 @@
   if (value && !already_set) {
     MetadataOnStackMark::record(this);
   }
+  assert(!value || !is_old() || is_obsolete() || is_running_emcp(),
+         "emcp methods cannot run after emcp bit is cleared");
 }
 
 // Called when the class loader is unloaded to make all methods weak.
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/StressRedefineWithoutBytecodeCorruption/TestDescription.java	Tue Sep 18 22:32:25 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/RedefineClasses/StressRedefineWithoutBytecodeCorruption/TestDescription.java	Tue Sep 18 16:11:36 2018 -0400
@@ -32,6 +32,7 @@
  *          /test/lib
  * @run driver jdk.test.lib.FileInstaller . .
  * @run main/othervm/native
+ *      -Xlog:redefine+class+iklass+purge=trace,redefine+class+iklass+add=trace
  *      -agentlib:stressRedefine
  *      nsk.jvmti.RedefineClasses.StressRedefine
  *      ./bin