diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-08-16 05:57:06 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-08-18 14:24:06 +0900 |
commit | 880c96576b2423d1e77e25a3a2da7fc761377728 (patch) | |
tree | 02e01c0f0f6cf7daf21b10fcde980ed79242c645 /newlib/libc | |
parent | 52730a0623a3f6871a9f3ab588b1e1abd795d9a9 (diff) | |
download | newlib-880c96576b2423d1e77e25a3a2da7fc761377728.zip newlib-880c96576b2423d1e77e25a3a2da7fc761377728.tar.gz newlib-880c96576b2423d1e77e25a3a2da7fc761377728.tar.bz2 |
Cygwin: spawn: Make ch_spwan_local be initialized properly
The class child_info_spawn has two constructors: one without arguments
and one with two arguments. The former does not initialize any members.
Commit 1f836c5f7394 used the latter to ensure that the local ch_spawn
(i.e., ch_spawn_local) would be properly initialized. However, this was
insufficient - it initialized only the base child_info members, not the
fields specific to child_info_spawn. This led to the issue reported in
https://cygwin.com/pipermail/cygwin/2025-August/258660.html.
This patch introduces a new constructor to properly initialize member
variable 'ev', etc., which were referred without initialization, and
switches ch_spawn_local to use it. 'subproc_ready', which may not be
initialized, is also initialized in the constructor of the base class
child_info.
Addresses: https://cygwin.com/pipermail/cygwin/2025-August/258660.html
Fixes: 1f836c5f7394 ("Cygwin: spawn: Make system() thread-safe")
Reported-by: Denis Excoffier <cygwin@Denis-Excoffier.org>
Reviewed-by: Jeremy Drake <cygwin@jdrake.com>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'newlib/libc')
0 files changed, 0 insertions, 0 deletions