diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake --- a/libc/cmake/modules/LLVMLibCTestRules.cmake +++ b/libc/cmake/modules/LLVMLibCTestRules.cmake @@ -513,7 +513,7 @@ ${LIBC_BUILD_DIR}/include ) target_compile_options(${fq_build_target_name} - PRIVATE -fpie -ffreestanding ${INTEGRATION_TEST_COMPILE_OPTIONS}) + PRIVATE -fpie -ffreestanding -fno-exceptions -fno-rtti ${INTEGRATION_TEST_COMPILE_OPTIONS}) # The GPU build requires overriding the default CMake triple and architecture. if(LIBC_GPU_TARGET_ARCHITECTURE_IS_AMDGPU) target_compile_options(${fq_build_target_name} PRIVATE diff --git a/libc/test/integration/src/pthread/pthread_create_test.cpp b/libc/test/integration/src/pthread/pthread_create_test.cpp --- a/libc/test/integration/src/pthread/pthread_create_test.cpp +++ b/libc/test/integration/src/pthread/pthread_create_test.cpp @@ -103,10 +103,8 @@ { // Allocate some bytes on the stack on most of the stack and make sure we - // have read/write permissions on the memory. -EXEC_PAGESIZE / 2 just as a - // buffer so we don't go beyond our limits (no nested function calls / not - // much other data on the stack so should be enough). - size_t test_stacksize = expec_stacksize - EXEC_PAGESIZE / 2; + // have read/write permissions on the memory. + size_t test_stacksize = expec_stacksize - 1024; volatile uint8_t *bytes_on_stack = (volatile uint8_t *)__builtin_alloca(test_stacksize);