RFR: 8262377: Parallel class resolution loses constant pool error [v4]
Coleen Phillimore
coleenp at openjdk.java.net
Wed Mar 10 14:04:10 UTC 2021
On Wed, 10 Mar 2021 05:52:26 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove complicated test in favor of Ioi's test, fix cause.
>
> src/hotspot/share/oops/constantPool.cpp line 877:
>
>> 875: // Needs clarification to section 5.4.3 of the VM spec (see 6308271)
>> 876: } else if (this_cp->tag_at(which).value() != error_tag) {
>> 877: add_resolution_error(this_cp, which, tag, PENDING_EXCEPTION);
>
> If the CAS below fails, which is this addition of the resolution error not undone?
It probably should be but we don't have a function to delete an individual resolution error, only all of them for the constant pool. So this needs to be done in a future RFE.
> src/hotspot/share/oops/constantPool.cpp line 568:
>
>> 566: if (old_tag == JVM_CONSTANT_UnresolvedClassInError) {
>> 567: // Remove klass.
>> 568: Atomic::release_store(adr, (Klass*)NULL);
>
> You don't need a release_store in this case as you just did a CAS which has full memory synchronization. But in addition as you are setting it to NULL there are no prior stores that you need to ensure are visible.
Ok, I'll change this to an assignment.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2718
More information about the hotspot-dev
mailing list