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 alex, alexandre.vassalotti, christian.heimes, deadshort, dmalcolm, donmez, gregory.p.smith, gvanrossum, jcea, loewis, mark.dickinson, matejcik, nnorwitz, pitrou, skrah, vstinner
Date 2011-09-24.15:57:04
SpamBayes Score 7.429659e-08
Marked as misclassified No
Message-id <1316879825.64.0.0286461968626.issue1621@psf.upfronthosting.co.za>
In-reply-to
Content
> don't apply any of the resulting changes to the maintenance releases,
> and target the issue only for 3.3.

That sounds fine to me, though if we find more instances of signed overflow that actually trigger test failures in the maintenance branches (like the int_pow one) on mainstream compilers, we might want to fix those there too, on a case-by-case basis.

To get started, here's a patch that fixes occurrences of signed overflow in the bytes, str and tuple hash methods, and also in set lookups.  It also fixes a related and minor casting inconsistency in dictobject.c  (which was using (size_t)hash & mask in some places, and just 'hash & mask' in others).  These are the minimal changes required to get Python to build completely using Clang with '-ftrapv' turned on and --with-pydebug enabled.
History
Date User Action Args
2011-09-24 15:57:05mark.dickinsonsetrecipients: + mark.dickinson, gvanrossum, loewis, nnorwitz, gregory.p.smith, jcea, pitrou, vstinner, christian.heimes, alexandre.vassalotti, donmez, matejcik, alex, skrah, dmalcolm, deadshort
2011-09-24 15:57:05mark.dickinsonsetmessageid: <1316879825.64.0.0286461968626.issue1621@psf.upfronthosting.co.za>
2011-09-24 15:57:05mark.dickinsonlinkissue1621 messages
2011-09-24 15:57:04mark.dickinsoncreate