review (S) for 6951190: assert(!klass_is_exact(), "only non-exact klass") while building JDK
Vladimir Kozlov
vladimir.kozlov at oracle.com
Mon May 10 11:25:44 PDT 2010
No. It will not handle situation when statically we don't know if argument is NULL.
And it will no work for NULL stopped() situation since 'failure' node will be NULL
so merge region will not have valid paths.
Can we just use existing code and add CheckCastPPNode cast after gen_instanceof() ?
Vladimir
Tom Rodriguez wrote:
> The !stopped() logic should handle that.
>
> tom
>
> On May 10, 2010, at 11:01 AM, Vladimir Kozlov wrote:
>
>> Tom,
>>
>> You need to add check for argument==null in inline_string_equal() after gen_checkcast() since it is false case.
>>
>> Vladimir
Tom Rodriguez wrote:
> http://cr.openjdk.java.net/~never/6951190
>
> 6951190: assert(!klass_is_exact(),"only non-exact klass") while building JDK
> Reviewed-by:
>
> This looks to be a long standing issue with the String.equals
> intrinsic. The code checks that the argument is a String but it never
> actually casts it to be a String. Later on when we're processing
> types for the AddP for the String.count field we're looking for a
> field at +20 in Object which of course doesn't exist so we hit that
> assert. The fix is to perform a real checkcast which includes to
> required cast to String. I also added an assert to check the contract
> with gen_checkcast that it always returns non-null failure_control.
> Tested by hand with failing JDK build.
More information about the hotspot-dev
mailing list