This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients
Date 2003-06-27.08:16:00
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=80475

The interning of short strings violates the refcnt==1 
assumption for _PyString_Resize.

A simple fix is to boost the initial value of "totalnew" by 1. 
Combined with an NULL argument to 
PyString_FromStringAndSize, this assures that resulting 
format string is not interned.  This will remain true even if 
the implementation of PyString_FromStringAndSize changes 
because only the uninitialized strings that can be interned 
are those of zero length.

Fixed and added a test case.  See:
  Modules/datetimemodule.c 1.67
  Lib/test/test_datetime.py 1.45
History
Date User Action Args
2007-08-23 14:14:15adminlinkissue761337 messages
2007-08-23 14:14:15admincreate