Request for reviews (XS): 7106774: JSR 292: nightly test inlineMHTarget fails with wrong result

Christian Thalinger christian.thalinger at oracle.com
Thu Nov 3 01:40:29 PDT 2011


Thank you, Vladimir.  -- Chris

On Nov 2, 2011, at 6:08 PM, Vladimir Kozlov wrote:

> Looks good.
> 
> Vladimir
> 
> On 11/2/11 7:03 AM, Christian Thalinger wrote:
>> http://cr.openjdk.java.net/~twisti/7106774/
>> 
>> 7106774: JSR 292: nightly test inlineMHTarget fails with wrong result
>> Reviewed-by:
>> 
>> The problem is in code which was added with 7090904 that checks if the
>> call site is a method handle invoke.  The new code uses
>> Bytecode::code() and compares the result to Bytecodes values:
>> 
>>     if (cur.code() == Bytecodes::_invokedynamic ||
>>         (cur.code() == Bytecodes::_invokevirtual&&
>> 
>> But an invokevirtual can be quickened so that the resulting Bytecode
>> is a different one:
>> 
>> (dbx) n
>> t at 2 (l at 2) stopped in Deoptimization::fetch_unroll_info_helper at line 393 in file "deoptimization.cpp"
>>   393       if (cur.code() == Bytecodes::_invokedynamic ||
>> (dbx) p cur.code()
>> cur.code() = _fast_invokevfinal
>> 
>> The fix is to use Bytecode_invoke::is_invokevirtual() and
>> is_invokedynamic() which use Bytecode::java_code().
>> 
>> Tested with failing test case.
>> 
>> src/share/vm/interpreter/bytecode.hpp
>> src/share/vm/runtime/deoptimization.cpp
>> 



More information about the hotspot-compiler-dev mailing list