Author vstinner
Recipients ronaldoussoren, vstinner
Date 2019-08-21.15:15:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On my FreeBSD 12.0 VM, /usr/bin/ld is a symbolic link to ld.ldd: it's the LLVM linker called "LLD":

I modified manually Makefile to give 16 MiB stack to the main thread using:

LINKFORSHARED=  -Wl,--export-dynamic "-Wl,-z" "-Wl,stack-size=0x1000000"

I added manually the following to Python/thread_pthread.h to give 16 MiB stack to thread:

#define THREAD_STACK_SIZE       0x1000000

Using that, the RecurisionError is raised at a depth of 1000 Python function calls: before we exhaust the C stack.


The syntax used in doesn't work with LLD. I get such error:

cc -pthread     -Wl,--export-dynamic -Wl,-stack_size,1000000 -o Programs/_testembed Programs/_testembed.o libpython3.9d.a -lcrypt -ldl  -lutil -lm   -lm

/usr/bin/ld: error: cannot open 1000000: No such file or directory
Date User Action Args
2019-08-21 15:15:38vstinnersetrecipients: + vstinner, ronaldoussoren
2019-08-21 15:15:38vstinnersetmessageid: <>
2019-08-21 15:15:38vstinnerlinkissue37906 messages
2019-08-21 15:15:38vstinnercreate