[libc-commits] [libc] [libc] Fix pthread_create_test for 32 bit systems (PR #66564)

Mikhail R. Gadelha via libc-commits libc-commits at lists.llvm.org
Fri Sep 15 18:01:58 PDT 2023


https://github.com/mikhailramalho created https://github.com/llvm/llvm-project/pull/66564

The test tries to set the guard_size and stack_size of a thread to SIZE_MAX / 4, which is a huge value in 64-bit systems but 1GB in 32-bit ones.

We remove this test since the previous line already sets a value that fails in both 64-bit and 32-bit systems.

>From 08b5d0279b93f4ef7dec3f42e09cfb45f2c3d090 Mon Sep 17 00:00:00 2001
From: "Mikhail R. Gadelha" <mikhail at igalia.com>
Date: Fri, 15 Sep 2023 21:56:11 -0300
Subject: [PATCH] [libc] Fix pthread_create_test for 32 bit systems

The test tries to set the guard_size and stack_size of a thread to
SIZE_MAX / 4, which is a huge value in 64-bit systems but 1GB in 32-bit
ones.

We remove this test since the previous line already sets a value that
fails in both 64-bit and 32-bit systems.
---
 libc/test/integration/src/pthread/pthread_create_test.cpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/libc/test/integration/src/pthread/pthread_create_test.cpp b/libc/test/integration/src/pthread/pthread_create_test.cpp
index 20a1139efbfa1ed..33dfe19f5ec4aff 100644
--- a/libc/test/integration/src/pthread/pthread_create_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_create_test.cpp
@@ -287,7 +287,6 @@ static void run_failure_tests() {
   run_failure_config(PTHREAD_STACK_MIN, SIZE_MAX);
   run_failure_config(PTHREAD_STACK_MIN, SIZE_MAX - PTHREAD_STACK_MIN);
   run_failure_config(SIZE_MAX / 2, SIZE_MAX / 2);
-  run_failure_config(SIZE_MAX / 4, SIZE_MAX / 4);
   run_failure_config(SIZE_MAX / 2 + 1234, SIZE_MAX / 2);
 
   // Test invalid parameters that are impossible to obtain via the



More information about the libc-commits mailing list