[PATCH] Cygwin: cygheap: fix fork error after heap has grown
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Apr 18 08:14:10 GMT 2023
Hi David,
On Apr 17 21:41, David McFarland wrote:
> 2f9b8ff0 introduced a problem where forks would sometimes fail with:
>
> child_copy: cygheap read copy failed, 0x0..0x80044C750, done 0, windows pid 14032, Win32 error 299
>
> When cygheap_max was > CYGHEAP_STORAGE_INITIAL, commit_size would be set to
> allocsize(cygheap_max), which is an address, not a size. VirtualAlloc would be
> called to commit commit_size bytes, which would fail, and then child_copy would
> be called with zero as the base address.
>
> Fixes: 2f9b8ff00cce ("Cygwin: decouple cygheap from Cygwin DLL")
> Signed-off-by: David McFarland <corngood@gmail.com>
> ---
> winsup/cygwin/mm/cygheap.cc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Patch pushed.
Thanks,
Corinna
More information about the Cygwin-developers
mailing list