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 mark.dickinson
Recipients ezio.melotti, flox, marcin.bachry, mark.dickinson, vstinner, zuo
Date 2010-01-26.20:04:18
SpamBayes Score 0.00055317034
Marked as misclassified No
Message-id <1264536259.9.0.516381961776.issue7788@psf.upfronthosting.co.za>
In-reply-to
Content
Thanks.  Yes, that fix seems to work.  I also tried rewriting the suspect test as

if (step >= Py_SIZE(self) - cur)

but this produced a different failure:  it looks like there's more than one point with potential overflow for cur.  Not to mention that the 'cur += step' in the for loop can produce undefined behaviour.

So making cur unsigned looks like the right solution here.

It would be good to review the rest of this function for similar problems while we're fixing this.
History
Date User Action Args
2010-01-26 20:04:20mark.dickinsonsetrecipients: + mark.dickinson, vstinner, ezio.melotti, marcin.bachry, zuo, flox
2010-01-26 20:04:19mark.dickinsonsetmessageid: <1264536259.9.0.516381961776.issue7788@psf.upfronthosting.co.za>
2010-01-26 20:04:18mark.dickinsonlinkissue7788 messages
2010-01-26 20:04:18mark.dickinsoncreate