[9] RFR(S): 8050079: crash while compiling java.lang.ref.Finalizer::runFinalizer

Tobias Hartmann tobias.hartmann at oracle.com
Mon Nov 17 11:33:24 UTC 2014


Hi John,

thanks for the review.

On 14.11.2014 19:38, John Rose wrote:
> On Nov 13, 2014, at 6:51 AM, Tobias Hartmann <tobias.hartmann at oracle.com
> <mailto:tobias.hartmann at oracle.com>> wrote:
> 
>>
>> Solution:
>> (1) A check for 'oop_is_instance' is added to ignore non-instance Klasses in the
>> subclass hierarchy.
>> (2) I added a check to only execute the interface related checks if we come from
>> a top level call.
>>
> 
> Good work.
> 
> For (1) I would prefer putting the check near to the operation it protects:
> 
> diff --git a/src/share/vm/code/dependencies.cpp b/src/share/vm/code/dependencies.cpp
> --- a/src/share/vm/code/dependencies.cpp
> +++ b/src/share/vm/code/dependencies.cpp
> @@ -904,6 +904,8 @@
>    bool is_witness(Klass* k) {
>      if (doing_subtype_search()) {
>        return Dependencies::is_concrete_klass(k);
> +    } else if (!k->oop_is_instance()) {
> +      return false;  // no methods to find in an array type
>      } else {
>        Method* m = InstanceKlass::cast(k)->find_method(_name, _signature);
>        if (m == NULL || !Dependencies::is_concrete_method(m))  return false;
> 
> If we ever put methods on arrays (clone, freeze, asList, etc.) it will be a
> little easier to see how to adjust this code.

Okay. I also had to remove the (unnecessary) 'InstanceClass::cast' in the
ADD_SUBCLASS_CHAIN macro because even if is_witness(k) returns false, we add the
subclasses of k to the worklist.

New webrev: http://cr.openjdk.java.net/~thartmann/8050079/webrev.02

Thanks,
Tobias


> — John


More information about the hotspot-compiler-dev mailing list