Author vstinner
Recipients vstinner
Date 2019-08-21.13:12:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1566393179.26.0.881790236597.issue37906@roundup.psfhosted.org>
In-reply-to
Content
Oh, my script called _thread.stack_size() to read the stack size, but that doesn't work: calling _thread.stack_size() sets the stack size to 0 again.

stack2.py is the fixed script. It seems like the test works with a stack of 8 MiB and the default recursion limit of 1000 Python frames:

vstinner@freebsd$ ./python stack.py 1000 4096
setrecursionlimit(1000)
stack_size: 4096.0 kiB = 4.0 MiB
Segmentation fault (core dumped)

vstinner@freebsd$ ./python stack.py 1000 8192
setrecursionlimit(1000)
stack_size: 8192.0 kiB = 8.0 MiB
end of main thread

So the problem is that the FreeBSD default thread stack size is too small.
History
Date User Action Args
2019-08-21 13:12:59vstinnersetrecipients: + vstinner
2019-08-21 13:12:59vstinnersetmessageid: <1566393179.26.0.881790236597.issue37906@roundup.psfhosted.org>
2019-08-21 13:12:59vstinnerlinkissue37906 messages
2019-08-21 13:12:59vstinnercreate