Skip to content

Commit c30adbd

Browse files
committed
Alpine: Ensure thread stack size is large enough (#211)
1 parent e664e63 commit c30adbd

File tree

10 files changed

+30
-0
lines changed

10 files changed

+30
-0
lines changed

2.7/alpine3.4/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ RUN set -ex \
6060
--enable-shared \
6161
--enable-unicode=ucs4 \
6262
&& make -j "$(nproc)" \
63+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
64+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
65+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
6366
&& make install \
6467
\
6568
&& runDeps="$( \

2.7/alpine3.6/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ RUN set -ex \
6060
--enable-shared \
6161
--enable-unicode=ucs4 \
6262
&& make -j "$(nproc)" \
63+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
64+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
65+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
6366
&& make install \
6467
\
6568
&& runDeps="$( \

2.7/alpine3.7/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ RUN set -ex \
6060
--enable-shared \
6161
--enable-unicode=ucs4 \
6262
&& make -j "$(nproc)" \
63+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
64+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
65+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
6366
&& make install \
6467
\
6568
&& runDeps="$( \

3.4/alpine3.4/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ RUN set -ex \
7272
--with-system-ffi \
7373
--without-ensurepip \
7474
&& make -j "$(nproc)" \
75+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
76+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
77+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
7578
&& make install \
7679
\
7780
&& runDeps="$( \

3.5/alpine3.4/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ RUN set -ex \
7272
--with-system-ffi \
7373
--without-ensurepip \
7474
&& make -j "$(nproc)" \
75+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
76+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
77+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
7578
&& make install \
7679
\
7780
&& runDeps="$( \

3.6/alpine3.4/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ RUN set -ex \
7272
--with-system-ffi \
7373
--without-ensurepip \
7474
&& make -j "$(nproc)" \
75+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
76+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
77+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
7578
&& make install \
7679
\
7780
&& runDeps="$( \

3.6/alpine3.6/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ RUN set -ex \
7272
--with-system-ffi \
7373
--without-ensurepip \
7474
&& make -j "$(nproc)" \
75+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
76+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
77+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
7578
&& make install \
7679
\
7780
&& runDeps="$( \

3.6/alpine3.7/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ RUN set -ex \
7272
--with-system-ffi \
7373
--without-ensurepip \
7474
&& make -j "$(nproc)" \
75+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
76+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
77+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
7578
&& make install \
7679
\
7780
&& runDeps="$( \

3.7-rc/alpine3.7/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ RUN set -ex \
7272
--with-system-ffi \
7373
--without-ensurepip \
7474
&& make -j "$(nproc)" \
75+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
76+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
77+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
7578
&& make install \
7679
\
7780
&& runDeps="$( \

Dockerfile-alpine.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ RUN set -ex \
6666
--with-system-ffi \
6767
--without-ensurepip \
6868
&& make -j "$(nproc)" \
69+
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
70+
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
71+
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
6972
&& make install \
7073
\
7174
&& runDeps="$( \

0 commit comments

Comments
 (0)