On Sun, 14 Sep 2025, Kirill Makurin wrote:

I pushed this patch series to by GitHub fork and noticed that all testcases-clang failed on aarch64[1]. The reason was pthread_misc/context1.c which was not prepared to handle arm platforms. I am not familiar with arm[64] and CONTEXT structure used in this test, so I simply added preprocessor conditions to skip this test for arm (patch 5).

I took a quick look at definition of CONTEXT structure and wonder if `Pc` member is the proper one for this test?

Yes, that's the right fix. Note that we have similar code already in pthread_cancel in src/thread.c as well.

I've tested it with this diff instead of your patch 5, and the test passes then:

diff --git a/mingw-w64-libraries/winpthreads/tests/pthread_misc/context1.c b/mingw-w64-libraries/winpthreads/tests/pthread_misc/context1.c
index 808da64a0..51870609b 100644
--- a/mingw-w64-libraries/winpthreads/tests/pthread_misc/context1.c
+++ b/mingw-w64-libraries/winpthreads/tests/pthread_misc/context1.c
@@ -50,8 +50,10 @@ main()
       GetThreadContext(hThread, &context);
 #ifdef _M_X64
          context.Rip = (uintptr_t) anotherEnding;
-#else
+#elif defined(_M_IX86)
          context.Eip = (uintptr_t) anotherEnding;
+#elif defined(_M_ARM) || defined(_M_ARM64)
+         context.Pc = (uintptr_t) anotherEnding;
 #endif

       SetThreadContext(hThread, &context);

// Martin



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

Reply via email to