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-boun...@openjdk.java.net> On 
Behalf Of Baesken, Matthias
Sent: Donnerstag, 28. November 2019 17:21
To: serviceability-dev@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/


Reply via email to