Re: [PATCH] Cygwin: Implement 'reserved' marker in fdtable entries
Jon Turney <[email protected]> Sat, 30 May 2026 12:33:26 +0100
| Newsgroups | gmane.os.cygwin.patches |
|---|---|
| Message-ID | <[email protected]> |
On 22/05/2026 15:21, Christian Franke wrote: > Jon Turney wrote: >> On 22/05/2026 08:28, Mark Geisert wrote: >>> ... >>> >>> The notion is that an fdtable entry provided by cygheap_fdnew is marked >>> so that another thread can't obtain it. Care is taken to reset the >>> marker when the entry is no longer needed. Actually, in the usual case >>> the marker is overwritten with a pointer to an fhandler_base structure, >>> by the reserving thread, as the syscall completes. >>> >>> Reported-by: Christian Franke <[email protected]> >>> Addresses: https://cygwin.com/pipermail/cygwin/2026-May/259664.html >>> Signed-off-by: Mark Geisert <[email protected]> >>> Fixes: e859706578ba (* autoload.cc (NtCreateFile): Add.) >> >> Thanks! >> >> This all seems fine and reasonable, but I have a couple of small >> comments. > > A test with an enhanced version of the STC was successful. > I could push this version (attached) to cygwin-apps/stc if desired. Yes, that would be great. Please do so. (I guess ideally after the fix is committed so it stays green, but it's red at the moment and I severely lack the time to investigate why...)