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