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 arigo
Recipients amaury.forgeotdarc, arigo, benjamin.peterson, eric.araujo, eric.smith, francismb, serhiy.storchaka
Date 2014-11-17.17:33:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1416245625.61.0.0186236689431.issue11145@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, sorry.  Ok.  Now a different issue: the user-defined function can return an interned string.  If it has a refcount of 1, _PyString_FormatLong() will mutate it.  Then when we DECREF it, string_dealloc() will not find it any more in the interned dict and crash with a fatal error.

Note that I'm mostly having fun finding holes in delicate logic, like mutating strings in-place.  It would be much more simple to either (1) stop calling the user-defined functions and behave similarly to most other built-in types; or (2) stop trying to mutate that poor string in-place and always just create a new one. :-)
History
Date User Action Args
2014-11-17 17:33:45arigosetrecipients: + arigo, amaury.forgeotdarc, eric.smith, benjamin.peterson, eric.araujo, francismb, serhiy.storchaka
2014-11-17 17:33:45arigosetmessageid: <1416245625.61.0.0186236689431.issue11145@psf.upfronthosting.co.za>
2014-11-17 17:33:45arigolinkissue11145 messages
2014-11-17 17:33:45arigocreate