threading_posix: Increase stack size in test

16 KB is not enough for the linux thread to be spawned so bump up to 16MB
This commit is contained in:
Sandy Carter 2020-11-21 22:18:49 -05:00 committed by Rick Gibbed
parent d76e408681
commit aa332dcc8e
2 changed files with 2 additions and 1 deletions

View File

@ -813,7 +813,7 @@ TEST_CASE("Create and Run Thread", "Thread") {
result = Wait(Thread::GetCurrentThread(), false, 50ms);
REQUIRE(result == WaitResult::kTimeout);
params.stack_size = 16 * 1024;
params.stack_size = 16 * 1024 * 1024;
thread = Thread::Create(params, [] {
while (true) {
Thread::Exit(-1);

View File

@ -505,6 +505,7 @@ class PosixCondition<Thread> : public PosixConditionBase {
}
}
if (pthread_create(&thread_, &attr, ThreadStartRoutine, start_data) != 0) {
pthread_attr_destroy(&attr);
return false;
}
pthread_attr_destroy(&attr);