Details
-
Sub-task
-
Resolution: Fixed
-
P4
-
17
-
b21
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8305226 | 11.0.20-oracle | Fairoz Matte | P4 | Resolved | Fixed | b01 |
JDK-8278097 | 11.0.15 | Paul Hohensee | P4 | Resolved | Fixed | b01 |
Description
/home/ysuenaga/git-forked/jdk/src/java.base/share/native/libjava/jni_util.c: In function 'newString646_US':
/home/ysuenaga/git-forked/jdk/src/java.base/share/native/libjava/jni_util.c:487:15: warning: 'buf' may be used uninitialized [-Wmaybe-uninitialized]
487 | result = (*env)->NewString(env, str1, len);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ysuenaga/git-forked/jdk/src/java.base/share/native/libjava/jni_util.c:487:15: note: by argument 2 of type 'const jchar *' {aka 'const short unsigned int *'} to 'struct _jobject *(const struct JNINativeInterface_ **, const jchar *, jsize)' {aka 'struct _jobject *(const struct JNINativeInterface_ **, const short unsigned int *, int)'}
/home/ysuenaga/git-forked/jdk/src/java.base/share/native/libjava/jni_util.c:465:11: note: 'buf' declared here
465 | jchar buf[512];
| ^~~
/home/ysuenaga/git-forked/jdk/src/java.base/share/native/libjava/jni_util.c:487:15: warning: 'buf' may be used uninitialized [-Wmaybe-uninitialized]
487 | result = (*env)->NewString(env, str1, len);
| ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ysuenaga/git-forked/jdk/src/java.base/share/native/libjava/jni_util.c:487:15: note: by argument 2 of type 'const jchar *' {aka 'const short unsigned int *'} to 'struct _jobject *(const struct JNINativeInterface_ **, const jchar *, jsize)' {aka 'struct _jobject *(const struct JNINativeInterface_ **, const short unsigned int *, int)'}
/home/ysuenaga/git-forked/jdk/src/java.base/share/native/libjava/jni_util.c:465:11: note: 'buf' declared here
465 | jchar buf[512];
| ^~~
Attachments
Issue Links
- backported by
-
JDK-8278097 -Wmaybe-uninitialized happens in jni_util.c
- Resolved
-
JDK-8305226 -Wmaybe-uninitialized happens in jni_util.c
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/126a16ec
-
Commit openjdk/jdk/4a9f2319
-
Review openjdk/jdk11u-dev/677
-
Review openjdk/jdk/3742
(1 links to)