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 gregory.p.smith
Recipients belopolsky, gregory.p.smith, jnferguson, lemburg, nnorwitz
Date 2008-04-14.03:12:41
SpamBayes Score 0.0068838215
Marked as misclassified No
Message-id <1208142764.87.0.11104603642.issue2620@psf.upfronthosting.co.za>
In-reply-to
Content
Here's a patch that fixes this by making both Python's malloc and
realloc return NULL if (0 <= size <= PY_SSIZE_T_MAX).

A side effect of this is that strings on 32bit platforms can no longer
be allocated up to 2**31-1 in length as the malloc includes the internal
python object structure overhead.  The maximum string size becomes
2147483609 with an optimized build on this system.

I do not think that is a problem.  A 32-bit process by definition can
only ever have one such object allocated at a time anyways. ;)

any objections?
History
Date User Action Args
2008-04-14 03:12:45gregory.p.smithsetspambayes_score: 0.00688382 -> 0.0068838215
recipients: + gregory.p.smith, lemburg, nnorwitz, belopolsky, jnferguson
2008-04-14 03:12:44gregory.p.smithsetspambayes_score: 0.00688382 -> 0.00688382
messageid: <1208142764.87.0.11104603642.issue2620@psf.upfronthosting.co.za>
2008-04-14 03:12:43gregory.p.smithlinkissue2620 messages
2008-04-14 03:12:43gregory.p.smithcreate