This test repeatedly creates many detached threads, to see if the pthread_t values end up repeated/reused or not.
While the threads are created detached and the threads exit very soon after being created, this can still end up creating all threads in parallel before any of them have exited. It's practically unfeasible to have 10000 threads in parallel on 32 bit, as it ends up exhausting the virtual address space for the stacks for the threads. Therefore, to make the test more reliable in 32 bit mode, lower the number of tested threads from 10000 to 1000 in 32 bit mode. This fixes this test when running in 32 bit ARM mode. Signed-off-by: Martin Storsjö <[email protected]> --- mingw-w64-libraries/winpthreads/tests/pthread_misc/reuse2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mingw-w64-libraries/winpthreads/tests/pthread_misc/reuse2.c b/mingw-w64-libraries/winpthreads/tests/pthread_misc/reuse2.c index e02002119..573659199 100644 --- a/mingw-w64-libraries/winpthreads/tests/pthread_misc/reuse2.c +++ b/mingw-w64-libraries/winpthreads/tests/pthread_misc/reuse2.c @@ -1,7 +1,11 @@ #include "test.h" enum { +#ifdef _WIN64 NUMTHREADS = 10000 +#else + NUMTHREADS = 1000 +#endif }; -- 2.43.0 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
