[Python-Dev] FW: regarding the Python Developer posting...

Dan Wolfe dkwolfe@pacbell.net
Sun, 01 Oct 2000 14:23:03 -0700

>> [commented out code that was causing seg fault in test_sre.py]

>you could try adding a Mac OS clause to the recursion limit stuff
>in Modules/_sre.c:
>#if !defined(USE_STACKCHECK)
>#if defined(...whatever's needed to detect Max OS X...)
>replace "...whatever...", and try larger values than 5000 (or smaller,
>if necessary.  10000 is clearly too large for your platform).
>(alternatively, you can increase the stack size.  maybe it's very small
>by default?)

the stack size is quite small by default - 512K.  After some testing I 
was able to figure out that it fails around 440 recursions... probably a 
bit too small in comparison to the other *nixes.... but then I'll defer 
to the experts in sre.

I was reading the August developer archives on the getrlimit and since 
that seem to be available, it's probably the right way to implement the 
stack check on Mac OS X.

Sure I can increase the default stack size - just a simple limit -h 
before running it in the shell... I let it run until about 7K 
recursions... even then it was only about 11MB and bumping the stack up 
by 30K or so per recursion... and I still had nearly 100MB free... and 
places to go. :-)

I'm going to write a bug report against Mac OS X and we'll see what 
happens.  In the meantime, you can hard code it to 440 and it will pass 
the test...  I've placed a patch on sourceforge that give the initial 
support for detecting Mac OS X as part of the make file but I still have 
to figure out how/where you defined MS_WIN64.... 

- Dan