RFR (L) JDK-8230199: consolidate signature parsing code in HotSpot sources

David Holmes david.holmes at oracle.com
Thu Feb 6 00:45:30 UTC 2020


Thanks Lois, nothing further from me.

David

On 6/02/2020 12:14 am, Lois Foltan wrote:
> 
> 
> On 2/4/2020 5:46 PM, David Holmes wrote:
>> Hi Lois,
>>
>> <trimming>
>>
>> On 5/02/2020 4:42 am, Lois Foltan wrote:
>>> On 2/3/2020 11:07 PM, David Holmes wrote:
>>>> Sorry I'm still unclear whether as_symbol() can ever return NULL? If 
>>>> it can't then the existing NULL checks should be removed. If it can 
>>>> then many other uses may need to add NULL checks.
>>>
>>> Signature::as_symbol can never return a NULL.  I have removed the 2 
>>> checks for null in nmethod::print_nmethod_labels() and 
>>> Method::has_unloaded_classes_in_signature().  See 
>>> http://cr.openjdk.java.net/~lfoltan/bug_jdk8230199.4/webrev/index.html
>>
>> There is a third case in signature.cpp itself:
>>
>> Klass* SignatureStream::as_klass(Handle class_loader, Handle 
>> protection_domain,
>>                                  FailureMode failure_mode, TRAPS) {
>>   if (!is_reference())  return NULL;
>>   Symbol* name = as_symbol();
>>   if (name == NULL) {
>>     assert(failure_mode == CachedOrNull, "signature incorrect failure 
>> mode");
>>     return NULL;
>>   }
>>
>> Thanks,
>> David
> 
> Fixed.  Updated webrev at: 
> http://cr.openjdk.java.net/~lfoltan/bug_jdk8230199.5/webrev/
> 
> Thanks for spotting that one,
> Lois


More information about the hotspot-runtime-dev mailing list