1 --- a/src/c11/impl/threads_posix.c 2022-10-04 16:30:04.564345425 -0400
2 +++ b/src/c11/impl/threads_posix.c 2022-10-04 16:43:51.794135619 -0400
4 thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
6 struct impl_thrd_param *pack;
8 + pthread_attr_t *attrp = NULL;
10 + pthread_attr_t attr = { 0 };
11 + pthread_attr_init(&attr);
12 + pthread_attr_setstacksize(&attr, 8388608);
13 + pthread_attr_t *attrp = &attr;
16 pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param));
17 if (!pack) return thrd_nomem;
20 - if (pthread_create(thr, NULL, impl_thrd_routine, pack) != 0) {
21 + if (pthread_create(thr, attrp, impl_thrd_routine, pack) != 0) {
23 + pthread_attr_destroy(&attr);
29 + pthread_attr_destroy(&attr);