RFR (S) 8245487: Potential double-free of interfaces array
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Thu Jun 4 15:45:27 UTC 2020
On 6/4/20 11:10 AM, Lois Foltan wrote:
>
>
> On 6/4/2020 11:00 AM, coleen.phillimore at oracle.com wrote:
>>
>>
>> On 6/4/20 10:34 AM, Lois Foltan wrote:
>>> On 6/4/2020 7:36 AM, coleen.phillimore at oracle.com wrote:
>>>> Summary: free _local_interfaces when we free _transitive_interfaces
>>>> since they can share memory.
>>>>
>>>> Tested with tier1-3, also test case with fastdebug and product
>>>> builds. ClassLoaderDataGraph::verify is enabled in product for
>>>> -XX:+VerifyBeforeExit.
>>>>
>>>> open webrev at
>>>> http://cr.openjdk.java.net/~coleenp/2020/8245487.01/webrev
>>>> bug link https://bugs.openjdk.java.net/browse/JDK-8245487
>>>>
>>>> Thanks to Fred for finding the problem and testing on valhalla
>>>> where it was first observed, and to Ioi for the test case (and
>>>> finding the problem too!)
>>>>
>>>> Thanks,
>>>> Coleen
>>>
>>> Looks good Coleen!
>>>
>>> Minor comment on the summary description within the test,
>>> classFileParserBug/TestBadPackageWithInterface.java. The test
>>> runtime/modules/JVMDefineModule.java does already test for a
>>> resulting IAE when a package named "java" is defined to a class
>>> loader other than the boot or platform class loader. So my
>>> understanding is that TestBadPackageWithInterface.java is really
>>> testing that if an exception is raised when a class is defined, then
>>> InstanceKlass::verify_on() will exit cleanly, correct?
>>
>> Thank you for reviewing. How about this for the comment:
>>
>> * @summary Check that if the VM rejects classes from packages
>> starting with "java/", it will exit
>> * cleanly after InstanceKlass::verify_on(), and not leave
>> freed memory in _local_interfaces.
>
> Looks good and clear!
thanks!
Coleen
> Lois
>
>>
>> Thanks!
>> Coleen
>>>
>>> Thanks,
>>> Lois
>>>
>>>
>>
>
More information about the hotspot-runtime-dev
mailing list