[Python-checkins] python/dist/src/Python pythonrun.c, 2.195, 2.196 sysmodule.c, 2.120, 2.121

Michael Hudson mwh at python.net
Mon Aug 11 14:17:08 EDT 2003


Michael Hudson <mwh at python.net> writes:

B> loewis at users.sourceforge.net writes:
>
>> Update of /cvsroot/python/python/dist/src/Python
>> In directory sc8-pr-cvs1:/tmp/cvs-serv32549/Python
>>
>> Modified Files:
>> 	pythonrun.c sysmodule.c 
>> Log Message:
>> Move initialization of sys.std{in,out}.encoding to Py_Initialize.
>> Verify that the encoding actually exists. Fixes #775985.
>> Will backport to 2.3.
>
> These changes seem to make a debug build of Python crap out on exit
> (during the final GC, the GC code is fiddling with an object that's
> been sprayed with pymalloc's 'deadbyte' value).
>
> Next stop, actually looking at the changes...

Got it: it looks like PySys_GetObject returns a borrowed reference.

You also set the encoding of sys.stdout twice -- the error message
suggests that you meant stdin the first time.  I'll fix that too.

Cheers,
mwh

-- 
  I'm a keen cyclist and I stop at red lights.  Those who don't need
  hitting with a great big slapping machine.
                                           -- Colin Davidson, cam.misc



More information about the Python-checkins mailing list