Skip to content

Commit 4b8fba2

Browse files
t-bltgKristofferC
authored andcommitted
MINSIGSTKSZ is no longer constant in glibc (#41860)
MINSIGSTKSZ is redefined to sysconf(_SC_MINSIGSTKSZ) starting from glibc 2.34 Co-authored-by: t-bltg <t-bltg@users.noreply.github.com> (cherry picked from commit f19b9a2)
1 parent 75961b2 commit 4b8fba2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/task.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <stdlib.h>
3030
#include <string.h>
3131
#include <signal.h>
32+
#include <unistd.h>
3233
#include <errno.h>
3334
#include <inttypes.h>
3435
#include "julia.h"
@@ -67,8 +68,8 @@ static inline void tsan_switch_to_ctx(void *state) {
6768

6869
// empirically, jl_finish_task needs about 64k stack space to infer/run
6970
// and additionally, gc-stack reserves 64k for the guard pages
70-
#if defined(MINSIGSTKSZ) && MINSIGSTKSZ > 131072
71-
#define MINSTKSZ MINSIGSTKSZ
71+
#if defined(MINSIGSTKSZ)
72+
#define MINSTKSZ (MINSIGSTKSZ > 131072 ? MINSIGSTKSZ : 131072)
7273
#else
7374
#define MINSTKSZ 131072
7475
#endif

0 commit comments

Comments
 (0)