RFR (JAXP): 8146961: Fix PermGen memory leaks caused by static final Exceptions
aleksej.efimov at oracle.com
Wed Aug 17 14:04:58 UTC 2016
Hi Joe, Aleksey,
Thank you for reviewing the initial fix.
I followed the Joe's suggestion (thanks for that) and removed static
'abort' field completely, the functionality was replaced by throwing the
exception of newly added type - AbortException. The new webrev with
removed 'abort' can be found here:
The Tomcat reproducer attached to the bug report fails without the fix
and passes with the new version of the fix.
The JPRT and JCK testing again shows no related jaxp tests failures.
On 15/08/16 21:09, Joe Wang wrote:
> Hi Aleksej,
> I suggest we get rid of the static abort. If RuntimeException happens,
> check where it happens. The first use case looks suspicious as it just
> returns if it's an instance of RE. For the 2nd case in DOM error
> report, let's throw a RuntimeException with the specified error
> message if error happens, and there's no handler or the handler failed
> to handle it. (would be better than an empty RE)
> On 8/15/16, 10:38 AM, Aleks Efimov wrote:
>> Please, help to review the fix for memory leak  in
>> com.sun.org.apache.xerces.internal.dom.DOMNormalizer that is caused
>> by usage of static final exceptions.
>> This problem was already fixed in Apache Xerces project  and I
>> would like to backport it to JDK9 Xerces implementation.
>> Webrev with the changes:
>> The Tomcat reproducer attached to the bug report fails without the
>> fix and passes with the fix.
>> The JPRT and JCK testing shows no jaxp tests failures with the
>> proposed fix.
>> With Best Regards,
>>  https://bugs.openjdk.java.net/browse/JDK-8146961
>>  https://issues.apache.org/jira/browse/XERCESJ-1667
More information about the core-libs-dev