cpython/Objects
Gregory P. Smith c2176e46d7 Fix the internals of our hash functions to used unsigned values during hash
computation as the overflow behavior of signed integers is undefined.

NOTE: This change is smaller compared to 3.2 as much of this cleanup had
already been done.  I added the comment that my change in 3.2 added so that the
code would match up.  Otherwise this just adds or synchronizes appropriate UL
designations on some constants to be pedantic.

In practice we require compiling everything with -fwrapv which forces overflow
to be defined as twos compliment but this keeps the code cleaner for checkers
or in the case where someone has compiled it without -fwrapv or their
compiler's equivalent.

Found by Clang trunk's Undefined Behavior Sanitizer (UBSan).

Cleanup only - no functionality or hash values change.
2012-12-10 18:32:53 -08:00
..
stringlib Issue #8271: Fix compilation on Windows 2012-11-04 23:59:15 +01:00
abstract.c Issue #16060: Fix a double DECREF in int() implementation. Thanks Serhiy Storchaka. 2012-09-27 19:38:59 +01:00
accu.c Issue #14387: Do not include accu.h from Python.h. 2012-03-22 14:38:16 +01:00
boolobject.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
bytearrayobject.c Fix compilation on Windows 2012-11-03 23:08:18 +01:00
bytes_methods.c Issue #13738: Simplify implementation of bytes.lower() and bytes.upper(). 2012-01-08 16:22:46 +01:00
bytesobject.c Fix the internals of our hash functions to used unsigned values during hash 2012-12-10 18:15:46 -08:00
capsule.c Issue #2443: Added a new macro, Py_VA_COPY, which is equivalent to C99 2010-08-11 17:31:17 +00:00
cellobject.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
classobject.c Py_TYPE() has already dereferenced self before the NULL check. Moved Py_TYPE() after the check for self == NULL 2012-09-10 02:45:56 +02:00
codeobject.c Issue #15456: Fix code __sizeof__ after #12399 change. 2012-07-26 22:23:23 +02:00
complexobject.c Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args and str.format(args) 2012-05-29 12:57:52 +02:00
descrobject.c merge 3.2 (#14699) 2012-05-01 09:51:46 -04:00
dictnotes.txt Issue #15055: update dictnotes.txt. Patch by Mark Shannon. 2012-06-24 21:03:45 +02:00
dictobject.c merge 3.2 2012-10-31 14:22:25 -04:00
enumobject.c Issue #14288: Serialization support for builtin iterators. 2012-04-03 10:49:41 +00:00
exceptions.c Issue #15784: Modify OSError.__str__() to better distinguish between 2012-08-28 19:33:26 +01:00
fileobject.c Rename _Py_identifier to _Py_IDENTIFIER. 2011-10-14 10:20:37 +02:00
floatobject.c Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
frameobject.c Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
funcobject.c use new generic __dict__ descriptor implementations 2012-02-19 20:02:57 -05:00
genobject.c Issue #13783: PEP 380 cleanup part 2, using the new identifier APIs in the generator implementation 2012-06-17 15:45:11 +10:00
iterobject.c Rename _PyIter_GetBuiltin to _PyObject_GetBuiltin, and do not include it in the stable ABI. 2012-04-05 00:04:20 +02:00
listobject.c Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
listsort.txt Merged revisions 74613,74615,74619-74620,74622 via svnmerge from 2009-09-01 08:13:16 +00:00
lnotab_notes.txt Merged revisions 72487-72488,72879 via svnmerge from 2009-07-21 04:30:03 +00:00
longobject.c Issue #16277: merge fix from 3.2 2012-10-18 19:53:28 +01:00
memoryobject.c Issue #15814: Use hash function that is compatible with the equality 2012-11-02 17:49:22 +01:00
methodobject.c Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues 2012-06-22 14:55:41 -04:00
moduleobject.c Issue #15394: Fix ref leaks in PyModule_Create. 2012-07-19 13:51:59 -05:00
namespaceobject.c Close #16160: Subclass support now works for types.SimpleNamespace. Thanks to RDM for noticing. 2012-10-16 22:35:38 -07:00
object.c merge 3.2 (#16369) 2012-10-30 23:27:52 -04:00
obmalloc.c Issue #15144: Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t. 2012-09-20 20:56:47 +02:00
rangeobject.c Issue #16402: Merge fix from 3.2 2012-11-04 11:47:05 +00:00
setobject.c Fix the internals of our hash functions to used unsigned values during hash 2012-12-10 18:32:53 -08:00
sliceobject.c Issue #14783: Merge changes from 3.2. 2012-10-07 14:56:27 -07:00
structseq.c Check for NULL return value in PyStructSequence_NewType(). Found by Coverity. 2012-08-19 11:20:41 +02:00
tupleobject.c Fix the internals of our hash functions to used unsigned values during hash 2012-12-10 18:32:53 -08:00
typeobject.c do safety checks on __qualname__ assignment 2012-10-31 00:01:15 -04:00
typeslots.inc remove __version__s dependent on subversion keyword expansion (closes #12221) 2011-05-31 20:52:17 -05:00
typeslots.py remove __version__s dependent on subversion keyword expansion (closes #12221) 2011-05-31 20:52:17 -05:00
unicodectype.c fix old titlecase function for extended case chars 2012-01-15 21:33:32 -05:00
unicodeobject.c Fix the internals of our hash functions to used unsigned values during hash 2012-12-10 18:32:53 -08:00
unicodetype_db.h update to Unicode 6.1 2012-02-20 22:24:29 -05:00
weakrefobject.c Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero. 2012-12-08 21:17:03 +01:00