Mercurial > hg > graal-jvmci-8
diff src/share/vm/code/nmethod.cpp @ 3458:393e144bb99b
7057587: JSR 292 - crash with jruby in test/test_respond_to.rb
Summary: don't skip receiver when GC'ing compiled invokedynamic callsites
Reviewed-by: twisti, kvn, jrose
author | never |
---|---|
date | Wed, 22 Jun 2011 14:45:37 -0700 |
parents | 2aa9ddbb9e60 |
children | be4ca325525a fdb992d83a87 |
line wrap: on
line diff
--- a/src/share/vm/code/nmethod.cpp Tue Jun 21 09:04:55 2011 -0700 +++ b/src/share/vm/code/nmethod.cpp Wed Jun 22 14:45:37 2011 -0700 @@ -1832,7 +1832,9 @@ if (!method()->is_native()) { SimpleScopeDesc ssd(this, fr.pc()); Bytecode_invoke call(ssd.method(), ssd.bci()); - bool has_receiver = call.has_receiver(); + // compiled invokedynamic call sites have an implicit receiver at + // resolution time, so make sure it gets GC'ed. + bool has_receiver = !call.is_invokestatic(); Symbol* signature = call.signature(); fr.oops_compiled_arguments_do(signature, has_receiver, reg_map, f); }