Skip to content

Commit 97fbf8d

Browse files
authored
Increase stack size to 32K on OpenBSD/Clang (#84)
microsocks segfaults on OpenBSD when building with Clang. However, building it with -O0 make the issue gone with default 16K stack. GCC works good under any conditions. 32K stack works good on OpenBSD -current (7.6).
1 parent 98421a2 commit 97fbf8d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sockssrv.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@
5959
#elif defined(__GLIBC__) || defined(__FreeBSD__) || defined(__sun__)
6060
#undef THREAD_STACK_SIZE
6161
#define THREAD_STACK_SIZE 32*1024
62+
#elif defined(__OpenBSD__) && defined(__clang__)
63+
#undef THREAD_STACK_SIZE
64+
#define THREAD_STACK_SIZE 32*1024
6265
#endif
6366

6467
static int quiet;

0 commit comments

Comments
 (0)