[Dev] Mac recursion limit?

Phillip J. Eby pje at telecommunity.com
Tue Mar 1 10:29:39 PST 2005


At 10:00 AM 3/1/05 -0800, Alec Flett wrote:
>Hey Phillip - I just tried this on mac without the modifications you describe:
>recurse
>add
>repr
>init
>getattr
>getitem
>Limit of 4900 is fine
>recurse
>add
>Segmentation fault
>
>seems pretty high!

The default of 1000 is generally conservative.  But the crash associated 
with bug 2563 was fewer than 500 levels, so non-main threads are apparently 
quite tight.


>I'll try it with threads later today or tomorrow if I get a chance... 
>also, I wonder how deep it can go if there are lots of local variables in use?

Local variables are stored in frame objects that are heap-allocated, so it 
shouldn't make a difference.  Only local variables of C functions (not 
Python ones) count towards the stack usage.



More information about the Dev mailing list