Mercurial > hg > graal-jvmci-8
changeset 23732:5dae5deb92fb
8162477: [JVMCI] assert(wf.check_method_context(ctxk, m)) failed: proper context
Reviewed-by: kvn
author | never |
---|---|
date | Tue, 02 Aug 2016 17:12:16 -0700 |
parents | 1ceab3d13eb8 |
children | b4838d622f3f |
files | src/share/vm/code/dependencies.cpp |
diffstat | 1 files changed, 17 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/code/dependencies.cpp Tue Aug 02 17:18:09 2016 -0700 +++ b/src/share/vm/code/dependencies.cpp Tue Aug 02 17:12:16 2016 -0700 @@ -1058,12 +1058,11 @@ if (!(m->is_public() || m->is_protected())) // The override story is complex when packages get involved. return true; // Must punt the assertion to true. - Klass* k = ctxk; - Method* lm = k->lookup_method(m->name(), m->signature()); - if (lm == NULL && k->oop_is_instance()) { + Method* lm = ctxk->lookup_method(m->name(), m->signature()); + if (lm == NULL && ctxk->oop_is_instance()) { // It might be an interface method - lm = ((InstanceKlass*)k)->lookup_method_in_ordered_interfaces(m->name(), - m->signature()); + lm = ((InstanceKlass*)ctxk)->lookup_method_in_ordered_interfaces(m->name(), + m->signature()); } if (lm == m) // Method m is inherited into ctxk. @@ -1077,11 +1076,19 @@ // Static methods don't override non-static so punt return true; } - if ( !Dependencies::is_concrete_method(lm, k) - && !Dependencies::is_concrete_method(m, ctxk) - && lm->method_holder()->is_subtype_of(m->method_holder())) - // Method m is overridden by lm, but both are non-concrete. - return true; + if (!Dependencies::is_concrete_method(lm, ctxk) && + !Dependencies::is_concrete_method(m, ctxk)) { + // They are both non-concrete + if (lm->method_holder()->is_subtype_of(m->method_holder())) { + // Method m is overridden by lm, but both are non-concrete. + return true; + } + if (lm->method_holder()->is_interface() && m->method_holder()->is_interface() && + ctxk->is_subtype_of(m->method_holder()) && ctxk->is_subtype_of(lm->method_holder())) { + // Interface method defined in multiple super interfaces + return true; + } + } } ResourceMark rm; tty->print_cr("Dependency method not found in the associated context:");