Author stutzbach
Recipients stutzbach
Date 2011-03-05.00:10:48
SpamBayes Score 7.26141e-13
Marked as misclassified No
Message-id <1299283849.1.0.295176765442.issue11402@psf.upfronthosting.co.za>
In-reply-to
Content
By the time _PyUnicode_Init is called and does the following:

    /* Init the implementation */                                               
    free_list = NULL;                                                           
    numfree = 0;                                                                

free_list is already in use.  _PyUnicode_Init clobbers whatever was stored there, leaking memory.

In Python 2, this was not an issue because no unicode functions were called prior to initialization.  In Python 3, Unicode objects are created when initializing other types.

I found this using valgrind to search for "definitely lost" memory.  I'd like to fix all of those cases, to make it easier to run valgrind on a regular basis.

I'll upload a patch momentarily.
History
Date User Action Args
2011-03-05 00:10:49stutzbachsetrecipients: + stutzbach
2011-03-05 00:10:49stutzbachsetmessageid: <1299283849.1.0.295176765442.issue11402@psf.upfronthosting.co.za>
2011-03-05 00:10:48stutzbachlinkissue11402 messages
2011-03-05 00:10:48stutzbachcreate