On 1.10.2025 15:12, Martin Storsjö wrote:
The default setjmp/longjmp functions on arm/aarch64 require
working SEH unwinding.

The tests that were failing (cancel3, cancel5 and cancel6a)
trigger the "Dangerous asynchronous cancelling" codepath in
pthread_cancel, which SuspendThread/SetThreadContext/ResumeThread
to force the other thread to run _pthread_invoke_cancel. This
probably leaves the stack and link registers in an unexpected
state where unwinding doesn't work.

Set a define that makes setjmp.h use the non-SEH versions of
setjmp/longjmp.

This fixes a few pthread_cancel tests on arm/aarch64 that were
failing on some OS versions before. (Although on some OS
versions, these tests did succeed.)

Signed-off-by: Martin Storsjö <[email protected]>
---
  mingw-w64-libraries/winpthreads/src/thread.c | 8 ++++++++
  1 file changed, 8 insertions(+)


Looks good to me.


Thanks,

Jacek



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to