[PATCH] fhandler_pipe: add sanity limit to handle loops

Takashi Yano takashi.yano@nifty.ne.jp
Sat Dec 25 03:19:02 GMT 2021


On Fri, 24 Dec 2021 16:39:13 -0800 (PST)
Jeremy Drake wrote:
> On Fri, 24 Dec 2021, Ken Brown wrote:
> 
> > On 12/24/2021 2:42 PM, Jeremy Drake wrote:
> > > It does seem to happen much more often on Windows on ARM64 (so much so
> > > that at first I thought it was an issue with their emulation).  With this
> > > patch I have not seen the issue again.
> >
> > So can you test your diagnosis by removing your patch and adding an assertion?
> 
> Done:
> :: Starting core system upgrade...
>  there is nothing to do
> :: Starting full system upgrade...
>  there is nothing to do
> assertion "phi->NumberOfHandles < n_handle" failed: file
> "../../.././winsup/cygwin/fhandler_pipe.cc", line 1275, function: void*
> fhandler_pipe::get_query_hdl_per_process(WCHAR*, OBJECT_NAME_INFORMATION*)
> Aborted

Could you please try
assert(phi->NumberOfHandles <= n_handle)
rather than
assert(phi->NumberOfHandles < n_handle)
?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>


More information about the Cygwin-patches mailing list