Skip to content

Commit 40f2d8e

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 6d827d6 commit 40f2d8e

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"
@@ -75,8 +76,8 @@ static inline void tsan_switch_to_ctx(jl_ucontext_t *ctx) {}
7576

7677
// empirically, jl_finish_task needs about 64k stack space to infer/run
7778
// and additionally, gc-stack reserves 64k for the guard pages
78-
#if defined(MINSIGSTKSZ) && MINSIGSTKSZ > 131072
79-
#define MINSTKSZ MINSIGSTKSZ
79+
#if defined(MINSIGSTKSZ)
80+
#define MINSTKSZ (MINSIGSTKSZ > 131072 ? MINSIGSTKSZ : 131072)
8081
#else
8182
#define MINSTKSZ 131072
8283
#endif

0 commit comments

Comments
 (0)