RFR (S) 8208172: SIGSEGV when owner of invokedynamic bootstrap method throws an exception - Symbol::increment_refcount()+0x0

coleen.phillimore at oracle.com coleen.phillimore at oracle.com
Tue Aug 21 00:30:45 UTC 2018



On 8/20/18 7:56 PM, David Holmes wrote:
> Hi Coleen,
>
> Looks good.
>
> On 21/08/2018 6:04 AM, coleen.phillimore at oracle.com wrote:
>> Summary: make table for resolution errors not always expect non-null 
>> message string.
>
> Thanks for fixing this. I'm unsure why we thought there had to be a 
> detail message? AFAIK there is no specified requirement for this. 
> Obviously having a detail message is the most common case.
>
> I'm also not clear why we only hit this in the indy bootstrap case?

We always create LinkageErrors in the vm with a message, so we expected 
one to always be present.  The case where it's converted to 
ExceptionInInitializerError hadn't been seen, or expected to be missing 
this information.  It's probably possible to write a test to have 
LinkageError =>  EIIE without indy.
>
> One minor comment:
>
> src/hotspot/share/classfile/resolutionErrors.cpp
>
> void ResolutionErrorEntry::set_message(Symbol* c) {
>     _message = c;
> +   if (_message != NULL) {
>       _message->increment_refcount();
> +   }
>   }
>
> Is there any reason not to move the assignment inside the if clause as 
> well?
>

The C++ class isn't zero initialized, so we have to initialize the 
message to NULL.

Thanks,
Coleen

> Thanks,
> David
>
>> Tested with hs-tier1-2, and all hotspot/jtreg/runtime tests, and test 
>> added.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/8208172.01/webrev
>> bug link https://bugs.openjdk.java.net/browse/JDK-8208172
>>
>> Thanks,
>> Coleen



More information about the hotspot-runtime-dev mailing list