8210861: Move assert to help diagnose rare RedefineStress crash

Assert that Method being marked on stack hasn't been missed by previous metadata walk

Reviewed-by: lfoltan
This commit is contained in:
Coleen Phillimore 2018-09-18 16:11:36 -04:00
parent d31e1ca5a4
commit a3931a76f6
2 changed files with 3 additions and 0 deletions

View file

@ -2152,6 +2152,8 @@ void Method::set_on_stack(const bool value) {
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.