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 serhiy.storchaka
Recipients Matt.Mackall, benjamin.peterson, gregory.p.smith, josh.r, larry, marmoute, mpm, python-dev, rhettinger, serhiy.storchaka
Date 2015-05-13.12:28:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
-            if (dictresize(mp, Py_SIZE(seq))) {
+            if (dictresize(mp, Py_SIZE(seq) / 2 * 3)) {

If Py_SIZE(seq) is 1, dictresize argument is 0.

Why not wryte the expression as Py_SIZE(seq) * 3 / 2? It never overflows, because Py_SIZE(seq) is the size of allocated array of pointers.
Date User Action Args
2015-05-13 12:28:09serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, gregory.p.smith, larry, benjamin.peterson, mpm, python-dev, Matt.Mackall, josh.r, marmoute
2015-05-13 12:28:09serhiy.storchakasetmessageid: <>
2015-05-13 12:28:09serhiy.storchakalinkissue23971 messages
2015-05-13 12:28:09serhiy.storchakacreate