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 gvanrossum
Recipients alexandre.vassalotti, christian.heimes, donmez, gregory.p.smith, gvanrossum, loewis
Date 2008-01-18.01:22:43
SpamBayes Score 0.0021405313
Marked as misclassified No
Message-id <>
I think the -Wstrict-overflow option may not be enough for the audit we

The overflow issue in expandtabs() still exists (in 2.5 as well as in
the trunk):

            if (*p == '\n' || *p == '\r') {
                i += j;
                old_j = j = 0;
                if (i < 0) {
                                    "new string is too long");
                    return NULL;

Here i and j are signed ints (Py_ssize_t) initially know to be >= 0; i
can only become < 0 through overflow.  This is the place where Ismail
(cartman) found a crash because the test was optimized away by GCC 4.3
before we added -fwrap.

If we ever hope to clean up the code to the point where -fwrapv is no
longer needed, the audit should find this spot!  (Good thing we at least
had a unittest for the overflow check.  This should be standard practice
for all overflow checks, as long it doesn't require allocating a GB or
more of memory.)
Date User Action Args
2008-01-18 01:22:45gvanrossumsetspambayes_score: 0.00214053 -> 0.0021405313
recipients: + gvanrossum, loewis, gregory.p.smith, christian.heimes, alexandre.vassalotti, donmez
2008-01-18 01:22:44gvanrossumsetspambayes_score: 0.00214053 -> 0.00214053
messageid: <>
2008-01-18 01:22:43gvanrossumlinkissue1621 messages
2008-01-18 01:22:43gvanrossumcreate