mirror of
https://github.com/intel/llvm.git
synced 2026-01-31 07:27:33 +08:00
[sanitizers] Allocate 12MB for stack instead of 134MB
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
This commit is contained in:
@@ -82,7 +82,7 @@ endif()
|
||||
# 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)
|
||||
|
||||
@@ -48,7 +48,9 @@ inline void PTHREAD_CREATE(pthread_t *thread, void *attr,
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user