<AWT Dev> [OpenJDK 2D-Dev] RFR [XS]: 8231445: check ZALLOC return values in awt coding
Philip Race
philip.race at oracle.com
Wed Sep 25 15:39:54 UTC 2019
Looks fine. getAllConfigs() already throws OOME in a couple of places so
in theory a caller should already be ready to handle that. Mainly I mean
that there shouldn't be any further JNI calls with a pending exception ...
-phil.
On 9/25/19, 12:39 AM, Baesken, Matthias wrote:
>
> Hello, please review this small fix . It deals with return value
> checking of ZALLOC .
>
> ZALLOC is a macro using calloc, please see :
>
> jdk/src/java.desktop/unix/native/common/awt/awt_p.h
> /* allocated and initialize a structure */
> #define ZALLOC(T) ((struct T *)calloc(1, sizeof(struct T)))
>
> ... so the return value has to be checked which is missing at
> some places.
>
> Bug/webrev :
>
> https://bugs.openjdk.java.net/browse/JDK-8231445
>
> http://cr.openjdk.java.net/~mbaesken/webrevs/8231445.0/
> <http://cr.openjdk.java.net/%7Embaesken/webrevs/8231445.0/>
>
> Thanks, Matthias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20190925/69478621/attachment.html>
More information about the awt-dev
mailing list