Don't allow to small stack for native thread

This commit is contained in:
ptitSeb 2022-01-23 16:34:58 +01:00
parent 58cd4119a6
commit ed551d1eb3

View File

@ -293,6 +293,8 @@ EXPORT int my_pthread_create(x86emu_t *emu, void* t, void* attr, void* start_rou
size_t stsize;
if(pthread_attr_getstacksize(attr, &stsize)==0)
stacksize = stsize;
if(stsize<512*1024) // emu and all needs some stack space, don't go too low
pthread_attr_setstacksize(attr, 512*1024);
}
if(GetStackSize(emu, (uintptr_t)attr, &attr_stack, &attr_stacksize))
{