diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-07-19 23:39:12 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-07-23 19:51:03 +0900 |
commit | 9b667234bfa6220dcca1afa1233a928d9100cfde (patch) | |
tree | 6fc724bd22579e86bdec09f6522d5e03ec7ac8e7 /newlib/libc/stdio/vasniprintf.c | |
parent | aec6dc77a11b264fcac73b63ada701854fc62a22 (diff) | |
download | newlib-9b667234bfa6220dcca1afa1233a928d9100cfde.zip newlib-9b667234bfa6220dcca1afa1233a928d9100cfde.tar.gz newlib-9b667234bfa6220dcca1afa1233a928d9100cfde.tar.bz2 |
Cygwin: spawn: Lock cygheap from refresh_cygheap() until child_copy()
...completion in child process because the cygheap should not be
changed to avoid mismatch between child_info::cygheap_max and
::cygheap_max. Otherwise, child_copy() might copy cygheap being
modified by other process.
In addition, to avoid deadlock, move close_all_files() for non-
Cygwin processes after unlocking cygheap, since close_all_files()
calls cfree(), which attempts to lock cygheap even when it's already
locked.
Fixes: 977ad5434cc0 ("* spawn.cc (spawn_guts): Call refresh_cygheap before creating a new process to ensure that cygheap_max is up-to-date.")
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'newlib/libc/stdio/vasniprintf.c')
0 files changed, 0 insertions, 0 deletions