-
Bug
-
Resolution: Fixed
-
P4
-
26
-
b07
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8364439 | 25.0.2 | Matthias Baesken | P4 | Resolved | Fixed | master |
When using GCC static analyzer (-fanalyzer), the following issue is reported.
Seems c->mode is initialized later in the method, but we use it already in the exception, this looks wrong.
/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c: In function 'Java_java_lang_ProcessImpl_forkAndExec':
/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:735:9: error: use of uninitialized value '*(ChildStuff *)p.mode' [CWE-457] [-Werror=analyzer-use-of-uninitialized-value]
735 | throwInternalIOException(env, errno, "Bad file descriptor", c->mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Seems c->mode is initialized later in the method, but we use it already in the exception, this looks wrong.
/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c: In function 'Java_java_lang_ProcessImpl_forkAndExec':
/jdk/src/java.base/unix/native/libjava/ProcessImpl_md.c:735:9: error: use of uninitialized value '*(ChildStuff *)p.mode' [CWE-457] [-Werror=analyzer-use-of-uninitialized-value]
735 | throwInternalIOException(env, errno, "Bad file descriptor", c->mode);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- backported by
-
JDK-8364439 [GCC static analyzer] ProcessImpl_md.c Java_java_lang_ProcessImpl_forkAndExec error: use of uninitialized value '*(ChildStuff *)p.mode
-
- Resolved
-
- relates to
-
JDK-8362516 Support of GCC static analyzer (-fanalyzer)
-
- Open
-
- links to
-
Commit(master) openjdk/jdk25u/4dc76843
-
Commit(master) openjdk/jdk/b85440d0
-
Review(master) openjdk/jdk25u/34
-
Review(master) openjdk/jdk/26316
(1 links to)