Commit Graph

4339 Commits

Author SHA1 Message Date
Christian Heimes 7ae251a025 Fix out of bounds read in long_new() for empty bytes with an explicit base. int(b'', somebase) calls PyLong_FromString() with char* of length 1 but the function accesses the first argument at offset 1. CID 715359 2012-09-12 15:32:06 +02:00
Christian Heimes 79b97ee2ab Fix out of bounds read in long_new() for empty bytes with an explicit base. int(b'', somebase) calls PyLong_FromString() with char* of length 1 but the function accesses the first argument at offset 1. CID 715359 2012-09-12 15:31:43 +02:00
Christian Heimes 5f520f4fed Issue #15900: Fixed reference leak in PyUnicode_TranslateCharmap() 2012-09-11 14:03:25 +02:00
Christian Heimes 76c082911b Fixed memory leak in error branch of object_repr which may leak a reference to mod when type_qualname returns NULL. CID 715371 2012-09-10 17:00:30 +02:00
Christian Heimes e81dc296f2 Fixed memory leak in error branch of object_repr which may leak a reference to mod when type_name returns NULL. CID 715371 2012-09-10 16:57:36 +02:00
Christian Heimes f4f9939a96 Fixed memory leak in error branch of formatfloat(). CID 719687 2012-09-10 11:48:41 +02:00
Christian Heimes 455657961e Fixed possible reference leak to mod when type_name() returns NULL 2012-09-10 03:01:16 +02:00
Christian Heimes a0e7e41cba Fixed possible reference leak to mod when type_name() returns NULL 2012-09-10 03:00:14 +02:00
Christian Heimes c4fe3fed6e PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak. 2012-09-10 02:55:13 +02:00
Christian Heimes d5a88044a3 PyTuple_Pack() was missing va_end() in its error branch which lead to a resource leak. 2012-09-10 02:54:51 +02:00
Christian Heimes 110ac16b9f Fixed resource leak to scratch when _PyUnicodeWriter_Prepare fails 2012-09-10 02:51:27 +02:00
Christian Heimes f03572d040 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
Christian Heimes 949f331731 Py_TYPE() has already dereferenced self before the NULL check. Moved Py_TYPE() after the check for self == NULL 2012-09-10 02:45:31 +02:00
Antoine Pitrou 5b4faae307 Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.

Note that the trashcan functions are part of the stable ABI, therefore
they have to be kept around for binary compatibility of extensions.
2012-09-06 01:17:42 +02:00
Antoine Pitrou 56cd62c04a Issue #13992: The trashcan mechanism is now thread-safe. This eliminates
sporadic crashes in multi-thread programs when several long deallocator
chains ran concurrently and involved subclasses of built-in container
types.

Because of this change, a couple extension modules compiled for 3.2.4
(those which use the trashcan mechanism, despite it being undocumented)
will not be loadable by 3.2.3 and earlier. However, extension modules
compiled for 3.2.3 and earlier will be loadable by 3.2.4.
2012-09-06 00:59:49 +02:00
Alexander Belopolsky f73c69e06f Issue #15855: added docstrings for memoryview methods and data descriptors new in 3.3. 2012-09-03 16:51:01 -04:00
Alexander Belopolsky e370c38131 Issue #15855: added docstrings for memoryview methods and data descriptors (merge 3.2). 2012-09-03 16:43:55 -04:00
Alexander Belopolsky 397e5c98bc Issue #15855: added docstrings for memoryview methods and data descriptors. 2012-09-03 16:29:11 -04:00
Antoine Pitrou 057119b0b7 Fix C++-style comment (xlc compilation failure) 2012-09-02 17:56:33 +02:00
Benjamin Peterson 6a42bd67d7 Make super() internal errors RuntimeError instead of SystemError (closes #15839) 2012-09-01 23:04:38 -04:00
Benjamin Peterson 4e07a8c9aa merge heads 2012-08-28 18:02:18 -04:00
Benjamin Peterson 59043f96ea merge 3.2 (#15801) 2012-08-28 18:01:45 -04:00
Benjamin Peterson 28a6cfaefc use the stricter PyMapping_Check (closes #15801) 2012-08-28 17:55:35 -04:00
Richard Oudkerk ea62bd50a3 Issue #15784: Modify OSError.__str__() to better distinguish between
errno error numbers and Windows error numbers.
2012-08-28 19:33:26 +01:00
Nick Coghlan 06e1ab0a6b Close #15573: use value-based memoryview comparisons (patch by Stefan Krah) 2012-08-25 17:59:50 +10:00
Brett Cannon 07c6e71689 Issue #15778: Coerce ImportError.args to a string when it isn't
already one.

Patch by Dave Malcolm.
2012-08-24 13:05:09 -04:00
Stefan Krah 5b27c53e36 Merge 3.2. 2012-08-21 08:25:41 +02:00
Stefan Krah 7cacd2eb92 Issue #15736: Fix overflow in _PySequence_BytesToCharpArray(). 2012-08-21 08:16:09 +02:00
Stefan Krah 6adf2433e4 Merge 3.2. 2012-08-20 11:13:58 +02:00
Stefan Krah fd24f9e51e Issue #15732: Fix (constructed) crash in _PySequence_BytesToCharpArray().
Found by Coverity.
2012-08-20 11:04:24 +02:00
Stefan Krah 8528c3145e Issue #15728: Fix leak in PyUnicode_AsWideCharString(). Found by Coverity. 2012-08-19 21:52:43 +02:00
Stefan Krah 7fda33b56a Mereg 3.2. 2012-08-19 11:22:28 +02:00
Stefan Krah 6b962860e2 Check for NULL return value in PyStructSequence_NewType(). Found by Coverity. 2012-08-19 11:20:41 +02:00
Nick Coghlan 0e41628d35 Merge str docstring fix from 3.2 2012-08-16 14:14:30 +10:00
Nick Coghlan 573b1fd779 Fix str docstring 2012-08-16 14:13:07 +10:00
Antoine Pitrou 721738fbee Issue #15604: Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
2012-08-15 23:20:39 +02:00
Antoine Pitrou 6f430e4963 Issue #15604: Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
2012-08-15 23:18:25 +02:00
Victor Stinner b3f5501250 Close #15534: Fix a typo in the fast search function of the string library (_s => s)
Replace _s with ptr to avoid future confusion. Add also non regression tests.
2012-08-02 23:05:01 +02:00
Richard Oudkerk 5562d9dc5d Issue #1692335: Move initial args assignment to BaseException.__new__
to help pickling of naive subclasses.
2012-07-28 17:45:28 +01:00
Stefan Krah e4c0799d9c Add unused parameter to a METH_NOARGS function. 2012-07-28 14:10:02 +02:00
Stefan Krah 7d12d9df13 Issue #12834: Fix PyBuffer_ToContiguous() for non-contiguous arrays. 2012-07-28 12:25:55 +02:00
Martin v. Löwis 3bbd2fad4d Issue #15456: Fix code __sizeof__ after #12399 change.
Patch by Serhiy Storchaka.
2012-07-26 22:23:23 +02:00
Antoine Pitrou b4bbee25b1 Issue #14579: Fix CVE-2012-2135: vulnerability in the utf-16 decoder after error handling.
Patch by Serhiy Storchaka.
2012-07-21 00:45:14 +02:00
Andrew Svetlov a0364764fd Merge 3.2 2012-07-20 14:52:54 +03:00
Andrew Svetlov ddcb6206bf Issue #15404: Refleak in PyMethodObject repr. 2012-07-20 14:51:45 +03:00
Meador Inge f4cc2161d5 Issue #15394: Fix ref leaks in PyModule_Create.
Patch by Julia Lawall.
2012-07-19 13:51:59 -05:00
Meador Inge 29e49d6394 Issue #15394: Fix ref leaks in PyModule_Create.
Patch by Julia Lawall.
2012-07-19 13:45:43 -05:00
Mark Dickinson 01ac8b6ab1 Use correct types for ASCII_CHAR_MASK integer constants. 2012-07-07 14:08:48 +02:00
Antoine Pitrou f87289bb58 Issue #15229: An OSError subclass whose __init__ doesn't call back
OSError.__init__ could produce incomplete instances, leading to crashes
when calling str() on them.
2012-06-30 23:37:47 +02:00
Antoine Pitrou a504a7a7d1 Issue #15055: update dictnotes.txt. Patch by Mark Shannon. 2012-06-24 21:03:45 +02:00