diff options
Diffstat (limited to 'main/python3/APKBUILD')
-rw-r--r-- | main/python3/APKBUILD | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/main/python3/APKBUILD b/main/python3/APKBUILD index e6daf5e699..bc812ba54f 100644 --- a/main/python3/APKBUILD +++ b/main/python3/APKBUILD @@ -5,7 +5,7 @@ pkgname=python3 # the python2-tkinter's pkgver needs to be synchronized with this. pkgver=3.6.3 _basever="${pkgver%.*}" -pkgrel=7 +pkgrel=8 pkgdesc="A high-level scripting language" url="http://www.python.org" arch="all" @@ -56,11 +56,30 @@ build() { --with-system-ffi \ --with-threads - make EXTRA_CFLAGS="$CFLAGS" + # set thread stack size to 1MB so we don't segfault before we hit + # sys.getrecursionlimit() + make EXTRA_CFLAGS="$CFLAGS -DTHREAD_STACK_SIZE=0x100000" } check() { cd "$builddir" + + # test that we reach recursionlimit before we segfault + cat > test-stacksize.py <<-EOF + import threading + import sys + + def fun(i): + try: + fun(i+1) + except: + sys.exit(0) + + t = threading.Thread(target=fun, args=[1]) + t.start() +EOF + LD_LIBRARY_PATH=$PWD ./python test-stacksize.py + local fail # musl related |