Skip to content

[New msys2-runtime version] 3 new items #5833

@github-actions

Description

@github-actions

[New msys2-runtime version] Cygwin: lock cygheap during fork

Cygwin: lock cygheap during fork

another thread may simultaneously be doing a cmalloc/cfree while the
cygheap is being copied to the child.

Addresses: https://cygwin.com/pipermail/cygwin/2025-September/258801.html
Signed-off-by: Jeremy Drake <cygwin@jdrake.com>
(cherry picked from commit 8a5d39527f9a56d1a623e86d30af6b590fd1472d)

msys2/msys2-runtime@dea5713

[New msys2-runtime version] Cygwin: spawn: Lock cygheap from refresh_cygheap() until child_copy()

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>
(cherry picked from commit 9b667234bfa6220dcca1afa1233a928d9100cfde)

msys2/msys2-runtime@b1ea15e

[New msys2-runtime version] Cygwin: cygheap: Add lock()/unlock() method

Cygwin: cygheap: Add lock()/unlock() method

...so that cygheap can be locked/unlocked from outside of mm/cygheap.cc.

Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
(cherry picked from commit aec6dc77a11b264fcac73b63ada701854fc62a22)

msys2/msys2-runtime@0cc9835

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions