[Python-3000] status (preparing for first alpha)

Amaury Forgeot d'Arc amauryfa at gmail.com
Mon Aug 27 10:22:42 CEST 2007


Hello,

Neal Norwitz wrote:
> There was a report that Windows/VC8
> was able to build python but it crashed in test_builtin.  Can anyone
> confirm this?

After some more digging:
- Only the debug build is concerned. No crash with a release build.
- The crash is a stack overflow.
- the failing function is test_cmp() in test_builtin.py, and indeed it
tries to "verify that circular objects are not handled", by expecting
a RuntimeErrror.
- The debugger stops in PyUnicode_EncodeUTF8. This function defines
somewhat large variable:
    #define MAX_SHORT_UNICHARS 300  /* largest size we'll do on the stack */
    char stackbuf[MAX_SHORT_UNICHARS * 4];

I suspect that the stack requirements for a recursive __cmp__ have increased.
It may be lower for a release build thanks to compiler optimizations.
I will try to come later with more precise measurements.

-- 
Amaury Forgeot d'Arc


More information about the Python-3000 mailing list