On Tue, 15 Jul 2025 12:51:09 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> 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); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Thanks for the reviews ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/26316#issuecomment-3077280423