1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-15795 Stack exceeded if pthread_attr_setstacksize(&thr_attr,8196) succeeds

on Linux this pthread_attr_setstacksize() fails with EINVAL
"The stack size is less than PTHREAD_STACK_MIN (16384) bytes".

But on FreeBSD it succeeds and causes a crash later, as 8196 is too little.

Let's keep the stack at its default size in the timer thread.
This commit is contained in:
Sergei Golubchik
2022-10-21 19:40:08 +02:00
parent 68391acef2
commit 3e377fd35b
3 changed files with 0 additions and 3 deletions

View File

@@ -263,7 +263,6 @@ int sigwait(sigset_t *setp, int *sigp)
pthread_attr_init(&thr_attr);
pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS);
pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHED);
pthread_attr_setstacksize(&thr_attr,8196);
pthread_create(&sigwait_thread_id, &thr_attr, sigwait_thread, setp);
pthread_attr_destroy(&thr_attr);
}