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 <1431520089.17.0.223198303338.issue23971@psf.upfronthosting.co.za>
In-reply-to
Content
-            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.
History
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: <1431520089.17.0.223198303338.issue23971@psf.upfronthosting.co.za>
2015-05-13 12:28:09serhiy.storchakalinkissue23971 messages
2015-05-13 12:28:09serhiy.storchakacreate