Re: [PATCH] Cygwin: Implement 'reserved' marker in fdtable entries
Christian Franke <[email protected]> Mon, 8 Jun 2026 14:10:54 +0200
| Newsgroups | gmane.os.cygwin.patches |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 30 May 2026 12:33, Jon Turney wrote: > 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. Done. > > (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...) Some STC (e.g. trace-sigsegv) ocasionally fail when run as part of the Cygwin CI workflow. Timing issues? Could not reproduce this neither locally nor at GH. I would suggest to add this to stc.yml to allow manual tests independent from push: https://github.com/chrfranke/cygwin-stc/commit/5c157ff6 -- Regards, Christian