Commit Graph

56717 Commits

Author SHA1 Message Date
R David Murray a96be78ed1 Merge #14617: clarify discussion of interrelationship of __eq__ and __hash__. 2012-09-11 13:02:13 -04:00
R David Murray d8bbde35fe #14617: clarify discussion of interrelationship of __eq__ and __hash__. 2012-09-11 13:01:43 -04:00
Benjamin Peterson 787269797e merge heads 2012-09-11 12:05:18 -04:00
Benjamin Peterson 6f3e5e48d3 remove useless and defined initialization (closes #15921) 2012-09-11 12:05:05 -04:00
Christian Heimes e9a6d62d9f Fix null pointer dereferencing in structmember.c PyMember_SetOne() for T_CHAR. _PyUnicode_AsStringAndSize() can return NULL without touching the len argument. Also remove unnecessary PyUnicode_Check(), _PyUnicode_AsStringAndSize() performance the test again. CID 486815 2012-09-11 17:31:08 +02:00
Christian Heimes 5557a9c73f Fix null pointer dereferencing in structmember.c PyMember_SetOne() for T_CHAR. _PyUnicode_AsStringAndSize() can return NULL without touching the len argument. Also remove unnecessary PyUnicode_Check(), _PyUnicode_AsStringAndSize() performance the test again. CID 486815 2012-09-11 17:30:53 +02:00
Christian Heimes 6d29352cfd Issue #15895: my analysis was slightly off. The FILE pointer is only leaked when set_main_loader() fails for a pyc file with closeit=0. In the success case run_pyc_file() does its own cleanup of the fp. I've changed the code to use another FILE ptr for pyc files and moved the fclose() to PyRun_SimpleFileExFlags() to make it more obvious what's happening. 2012-09-11 15:47:28 +02:00
Christian Heimes 6a77af690f Issue #15895: Fix FILE pointer leak in PyRun_SimpleFileExFlags() when filename points to a pyc/pyo file and closeit is false. 2012-09-11 14:11:03 +02:00
Christian Heimes 26b9f4b2f3 Spelling past tense -> present tense 2012-09-11 14:08:49 +02:00
Christian Heimes 5f520f4fed Issue #15900: Fixed reference leak in PyUnicode_TranslateCharmap() 2012-09-11 14:03:25 +02:00
Senthil Kumaran e4eee73293 merge. Fix issue #15899: Make the unicode.rst doctests pass. Patch by Chris Jerdonek. 2012-09-11 03:20:22 -07:00
Senthil Kumaran 2fd8bdbc9d Fix issue #15899: Make the unicode.rst doctests pass. Patch by Chris Jerdonek. 2012-09-11 03:17:52 -07:00
R David Murray ce478b9891 #15886: remove redundant phrase 2012-09-10 21:08:50 -04:00
Jesus Cea b7a2800831 MERGE: Closes #15793: Stack corruption in ssl.RAND_egd() 2012-09-11 02:08:48 +02:00
Jesus Cea c8754a13e6 Closes #15793: Stack corruption in ssl.RAND_egd() 2012-09-11 02:00:58 +02:00
Jesus Cea 67bd81b867 MERGE: #15676: mmap: add empty file check prior to offset check <- Previous patch was incomplete (fix 2) 2012-09-10 22:58:35 +02:00
Jesus Cea e8db356cf1 #15676: mmap: add empty file check prior to offset check <- Previous patch was incomplete (fix 2) 2012-09-10 22:58:07 +02:00
Jesus Cea 4886d5b338 #15676: mmap: add empty file check prior to offset check <- Previous patch was incomplete 2012-09-10 22:50:21 +02:00
Jesus Cea 1f2799bef4 #15676: mmap: add empty file check prior to offset check <- Previous patch was incomplete 2012-09-10 22:49:50 +02:00
Jesus Cea 7b9c48f339 MERGE: #15676: Proper attribution in Misc/ACKS 2012-09-10 20:20:02 +02:00
Jesus Cea 3159cb51a7 #15676: Proper attribution in Misc/ACKS 2012-09-10 20:19:25 +02:00
Stefan Krah 76e12179c5 Issue #15882: Change _decimal to accept any coefficient tuple when
constructing infinities. This is done for backwards compatibility
with decimal.py: Infinity coefficients are undefined in _decimal
(in accordance with the specification).
2012-09-10 19:34:58 +02:00
Christian Heimes f47d79fec1 Fixed reference leak in error branch of _bufferedreader_read_all(). The variable data can contain a bytes object but it wasn't cleaned up when PyList_New() failed. CID 715364 2012-09-10 17:46:09 +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 10e85ded9b Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going out of scope leaks the storage it points to. 2012-09-10 16:53:28 +02:00
Christian Heimes 3d463393bb Fixed memory leak in error branch of parsestrplus. CID 715374 Variable s going out of scope leaks the storage it points to. 2012-09-10 16:52:42 +02:00
R David Murray c3bfb01a95 Merge #14649: clarify DocTestSuite error when there are no docstrings.
Also adds tests to verify the documented behavior (which is probably a bug, as
indicated in the added comments).

Patch by Chris Jerdonek.
2012-09-10 10:16:46 -04:00
R David Murray 5abd76a75d #14649: clarify DocTestSuite error when there are no docstrings.
Also adds tests to verify the documented behavior (which is probably a bug, as
indicated in the added comments).

Patch by Chris Jerdonek.
2012-09-10 10:15:58 -04:00
R David Murray b83b287f17 Null merge for ddb406904be1 backport. 2012-09-10 10:10:13 -04:00
Christian Heimes 7b648753ab Added test for 85cb90f79cbf and see how the code handles all flags at once 2012-09-10 14:48:43 +02:00
doko@ubuntu.com 01beb69c7d backport from the trunk, to fix test_tools with srcdir != builddir
changeset:   77827:c23b442b5d5e
	user:        Antoine Pitrou <solipsis@pitrou.net>
	date:        Thu Jun 28 01:20:26 2012 +0200
	summary:     Avoid using scrdir, it's broken.

	changeset:   77826:f0e58e778215
	user:        Neil Schemenauer <nas@arctrix.com>
	date:        Wed Jun 27 15:58:37 2012 -0600
	summary:     Fix bug in test_tools that prevented building is separate directory.
2012-09-10 14:19:42 +02:00
Richard Oudkerk c3a2c59806 Merge 2012-09-10 13:06:02 +01:00
Richard Oudkerk b517596721 Issue #15901: Change example to use byte string instead of string 2012-09-10 13:00:33 +01:00
Christian Heimes 879329d66e Added missing va_end in error branch of PyArg_UnpackTuple(). CID 486641 2012-09-10 13:17:23 +02:00
Christian Heimes 48d8d21438 Added missing va_end in error branch of PyArg_UnpackTuple(). CID 486641 2012-09-10 13:16:45 +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 89ff3c7f20 Fixed out-of-bounce write to rawmode buffer. The fixed size buffer wasn't enlarged for the new 'x' flag. The buffer may contain the 5 flags xrwa+ and the \0 byte 2012-09-10 03:50:48 +02:00
Christian Heimes 310f81449a Closed reference leak of variable 'k' in function ste_new which wasn't decrefed in error cases 2012-09-10 03:09:17 +02:00
Christian Heimes 837e53a7c2 Closed reference leak of variable 'k' in function ste_new which wasn't decrefed in error cases 2012-09-10 03:08:46 +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
Christian Heimes 1b5c76a283 Fixed two memory leaks in make_filename() in zipimport.c. The allocated buffer wasn't cleaned up in two error cases. CID 486832 2012-09-10 02:00:34 +02:00
Christian Heimes 15b6885fe0 Make sure that *really* no more than sizeof(ifr.ifr_name) chars are strcpy-ed to ifr.ifr_name and that the string is *always* NUL terminated. New code shouldn't use strcpy(), too. CID 719692 2012-09-10 01:25:50 +02:00
Jesus Cea 1b3f3b0316 Closes #15676: mmap: add empty file check prior to offset check 2012-09-10 01:23:05 +02:00