The thread registry test was failing to allocate 25 threads with stack
size 134MB, which is pretty reasonable.
Also print the error code in our pthread wrappers in case this happens
again.
llvm-svn: 275209
# enough for the unittests. Some unittests require more than 2M.
# The default stack size for clang is 8M.
if(MSVC)
- list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON -Wl,/STACK:0x8000000)
+ list(APPEND SANITIZER_TEST_LINK_FLAGS_COMMON -Wl,/STACK:0xC00000)
endif()
set(SANITIZER_TEST_LINK_LIBS)
data->start_routine = start_routine;
data->arg = arg;
*thread = CreateThread(0, 0, PthreadHelperThreadProc, data, 0, 0);
- ASSERT_NE(nullptr, *thread) << "Failed to create a thread.";
+ DWORD err = GetLastError();
+ ASSERT_NE(nullptr, *thread) << "Failed to create a thread, got error 0x"
+ << std::hex << err;
}
inline void PTHREAD_JOIN(pthread_t thread, void **value_ptr) {