[PATCH] Cygwin: Implement 'reserved' marker in fdtable entries
Christian Franke
Christian.Franke@t-online.de
Mon Jun 8 12:10:54 GMT 2026
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 <Christian.Franke@t-online.de>
>>>> Addresses: https://cygwin.com/pipermail/cygwin/2026-May/259664.html
>>>> Signed-off-by: Mark Geisert <mark@maxrnd.com>
>>>> 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
More information about the Cygwin-patches
mailing list