Re: [PATCH] Cygwin: exceptions: Fix AArch64 non-incyg signal handling
Jon Turney <[email protected]> Sat, 20 Jun 2026 14:40:52 +0100
| Newsgroups | gmane.os.cygwin.patches |
|---|---|
| Message-ID | <[email protected]> |
On 18/06/2026 15:05, Máte Dimand wrote: > Thank you for the response! > > On 6/17/2026 1:07 PM, Jon Turney wrote: >> It seems like it should be possible to construct a relatively simple >> test to demonstrate this. Could you suggest what that test might look >> like? > > I have attached the source code for a reproducer. It reproduces the > issue by forking the process and having the child process signal the > parent process while the parent process is in a leaf function (which > doesn't preserve the link register). The expected behavior is both begin > and end getting printed successfully and the process ending gracefully. > However, without the patch, only begin gets printed, the parent process > crashes inside the test function, and the child process will fail to > send SIGUSR1 to the dead parent process. Ah, got it. So we don't even need to be interrupting read() for it to occur. Even simpler. I'll put this to one side to hopefully add to our testing when I can. > Unfortunately, to my knowledge, the current upstream version of AArch64 > Cygwin GCC is not yet suitable for compiling it. I have built myself a cross-compiler with Evgeny Karpov's patch set from a few months ago. I don't know if there's something more recent I should be using. But that's academic since I don't have any hardware to run it on :). >> Hmmm... it seems like this is functionally incremental to a patch >> which hasn't been applied yet, but I can't work out which one. > Maybe you were thinking of this patch: https://cygwin.com/pipermail/ > cygwin-patches/2026q1/014641.html but as far as I can tell it has > already been applied, for example this is where the X30/LR register gets > set in sigdelayed: https://cygwin.com/cgit/newlib-cygwin/tree/winsup/ > cygwin/scripts/gendef#n558. Ah, right. I'd got mixed up. Anyhow, I'll take a more detailed look at the patch, but I need to refresh my memory of how all this stuff works first, which might take a little while. >> I spent about an hour trying to salvage this, without success. Could I >> possibly trouble you to resend it as an attachment? > I'm sorry for giving you trouble with the formatting of my patch yet > again, I have attached it in this message. No problem. Sending it as an attachment worked fine. Thanks.