RFR: 8058093: Test nsk/stress/jck60/jck60014: assert in src/share/vm/oops/constantPool.cpp: should not be resolved otherwise

Coleen Phillimore coleen.phillimore at oracle.com
Tue Oct 28 20:20:16 UTC 2014


Thank you Harold.  I updated the comment and separated the asserts as 
you requested.

       save_and_throw_exception(this_cp, which, 
constantTag(JVM_CONSTANT_UnresolvedClass), CHECK_NULL);
       // If CHECK_NULL above doesn't return the exception, that means that
       // some other thread has beaten us and has resolved the class.
       // To preserve old behavior, we return the resolved class.
       entry = this_cp->resolved_klass_at(which);
       assert(entry.is_resolved(), "must be resolved if exception was 
cleared");
       assert(entry.get_klass()->is_klass(), "must be resolved to a klass");
       return entry.get_klass();

Coleen

On 10/28/2014 04:15 PM, harold seigel wrote:
> Hi Coleen,
>
> Your changes look good.
>
> Thanks, Harold
>
> On 10/24/2014 9:49 AM, Coleen Phillimore wrote:
>> Also: 8044209: nsk/split_verifier/security/coglio06 fails with exit 
>> code 97 - missing 'prohibited package name'
>>
>> Summary: Fix resolution error saving.
>>
>> These bugs are together because code changes fix both.   For 
>> jck60014, constant pool resolution is not deterministic.  You can 
>> have some threads install security managers and then remove them (or 
>> install new ones).  This test isn't supposed to pass but it isn't 
>> supposed to crash either.  So the code change restores the concurrent 
>> update of constant pool tag so that if it's resolved, the resolution 
>> wins the race.  It restores the comment also.
>>
>> For coglio06, the call from deoptimization ignores the error so if we 
>> don't save the resolution error in the constant pool, it is 
>> reresolved by the interpreter and the error is reported with the 
>> cause.  Technically, we should save the cause too, but I don't have a 
>> test case that relies on that with this fix and it's expensive for 
>> footprint and code changes.
>>
>> Testing:  hotspot/jtreg, vm.quick.testlist, jck's (which test saving 
>> resolution error for jvmti modifying bootclasspath), and my own test 
>> which I can't add because it relies on adding sleeps in the jvm and 
>> test case.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/8058093/
>> bug link https://bugs.openjdk.java.net/browse/JDK-8058093
>>
>> Thanks,
>> Coleen
>



More information about the hotspot-runtime-dev mailing list