Re: [PATCH v2] cygthread: suspend thread before terminating.

2024-11-19 Thread Jeremy Drake via Cygwin-patches
On Tue, 19 Nov 2024, Corinna Vinschen wrote: > On Nov 18 10:10, Jeremy Drake via Cygwin-patches wrote: > > On Mon, 18 Nov 2024, Corinna Vinschen wrote: > > > > > Neat, but if this only affects the ARM64 emulation, shouldn't this only > > > be called under wincap.cpu_arch() == PROCESSOR_ARCHITECTUR

Re: [PATCH v2] cygthread: suspend thread before terminating.

2024-11-19 Thread Corinna Vinschen
On Nov 18 10:10, Jeremy Drake via Cygwin-patches wrote: > On Mon, 18 Nov 2024, Corinna Vinschen wrote: > > > Neat, but if this only affects the ARM64 emulation, shouldn't this only > > be called under wincap.cpu_arch() == PROCESSOR_ARCHITECTURE_AMD64? > > Wouldn't this always be true though? Cop

Re: [PATCH v2] cygthread: suspend thread before terminating.

2024-11-18 Thread Jeremy Drake via Cygwin-patches
On Mon, 18 Nov 2024, Corinna Vinschen wrote: > Neat, but if this only affects the ARM64 emulation, shouldn't this only > be called under wincap.cpu_arch() == PROCESSOR_ARCHITECTURE_AMD64? Wouldn't this always be true though? (Except that I backported this to 3.3.6 for i686 support, where I'd hav

Re: [PATCH v2] cygthread: suspend thread before terminating.

2024-11-18 Thread Corinna Vinschen
Hi Jeremy, thanks for this patch, it looks pretty nice. A few minor points... On Nov 14 08:24, Jeremy Drake via Cygwin-patches wrote: > @@ -302,6 +302,20 @@ cygthread::terminate_thread () >if (!inuse) > goto force_notterminated; > > + if (_my_tls._ctinfo != this) > +{ > + CO

[PATCH v2] cygthread: suspend thread before terminating.

2024-11-14 Thread Jeremy Drake via Cygwin-patches
From: Jeremy Drake This addresses an extremely difficult to debug deadlock when running under emulation on ARM64. A relatively easy way to trigger this bug is to call `fork()`, then within the child process immediately call another `fork()` and then `exit()` the intermediate process. It would s