diff -r 1e225dabccc5 -r 53d23b6b25cd src/share/vm/opto/graphKit.hpp --- a/src/share/vm/opto/graphKit.hpp Mon Jul 24 09:32:40 2017 -0700 +++ b/src/share/vm/opto/graphKit.hpp Thu Nov 17 16:06:56 2016 +0000 @@ -656,7 +656,10 @@ // callee (with all arguments still on the stack). Node* null_check_receiver_before_call(ciMethod* callee) { assert(!callee->is_static(), "must be a virtual method"); - const int nargs = callee->arg_size(); + // Callsite signature can be different from actual method being called (i.e _linkTo* sites). + // Use callsite signature always. + ciMethod* declared_method = method()->get_method_at_bci(bci()); + const int nargs = declared_method->arg_size(); inc_sp(nargs); Node* n = null_check_receiver(); dec_sp(nargs);