RFR: 8264760: JVM crashes when two threads encounter the same resolution error [v3]

David Holmes dholmes at openjdk.java.net
Mon Apr 12 23:43:01 UTC 2021


On Thu, 8 Apr 2021 04:40:05 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Wang Huang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   add throw exception
>
> src/hotspot/share/classfile/systemDictionary.cpp line 1939:
> 
>> 1937:     ResolutionErrorEntry* entry = resolution_errors()->find_entry(index, hash, pool, which);
>> 1938:     if (entry != NULL && entry->nest_host_error() == NULL) {
>> 1939:       entry->set_nest_host_error(message);
> 
> You should never find an entry where the nest_host_error() is NULL. If there were such an entry then it implies a regular resolution error occurred, but that means we cannot have reached this code as `klass_at` in our caller would have thrown the exception. So this should simply be:
> if (entry != NULL) {
>   assert(entry->nest_host_error() != NULL, "cannot have a NULL error at this point");
> }
> You also need to delete part of the method comment:
> //... If an entry already exists it will
> // be updated with the nest host error message.
> as we don't do that.

Sorry the above is not correct. I believe the code you have is correct. I will double-check some details then update my review.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3392


More information about the hotspot-runtime-dev mailing list