Hi All,

Please review a jck print test crash fix for jdk9. The issue was seen with only Nimbus L&F which seems to use Linear gradient path
and not in other L&F (such as Aqua) .

Bug: https://bugs.openjdk.java.net/browse/JDK-8176287
webrev: http://cr.openjdk.java.net/~psadhukhan/8176287/webrev.00/

Linear Gradient path collects the gradient colors and fractions values in native obtained from Java and allocates several arrays to store the same in setupGradient() method. It seems even after being freed, in subsequent call to the same gradient path routine, it may get the same allocated pointer the next time the array is allocated causing it to crash citing "memory being modified after freed".

Optimise setupGradient() method to allocate fewer pointer. The JCK test works now. Also, the JDK-8162796 testcase LinearGradientPrintingTest and RadialGradientPrintingTest works with this optimisation.

Regards
Prasanta

Reply via email to