RFR [XS]: 8234968: check calloc rv in libinstrument InvocationAdapter
Langer, Christoph
christoph.langer at sap.com
Fri Nov 29 05:28:01 UTC 2019
Hi Matthias,
you'll have to initialize *decodedLen = 0; before you return, otherwise there's a build error on Linux:
.../jdk/src/java.instrument/share/native/libinstrument/InvocationAdapter.c:866:17: error: 'len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
int new_len = convertUft8ToPlatformString(path, len, platform, MAXPATHLEN);
^~~~~~~
Apart from that, the fix looks good and trivial.
Cheers
Christoph
From: serviceability-dev <serviceability-dev-bounces at openjdk.java.net> On Behalf Of Baesken, Matthias
Sent: Donnerstag, 28. November 2019 17:21
To: serviceability-dev at openjdk.java.net
Subject: [CAUTION] RFR [XS]: 8234968: check calloc rv in libinstrument InvocationAdapter
Hello, please review this small patch .
It adds return value checking for calloc at one place where it is missing .
Thanks, Matthias
Bug/webrev :
https://bugs.openjdk.java.net/browse/JDK-8234968
http://cr.openjdk.java.net/~mbaesken/webrevs/8234968.1/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20191129/b907e7e1/attachment.html>
More information about the serviceability-dev
mailing list