From: Serhiy Storchaka Date: Tue, 28 May 2013 13:27:08 +0000 (+0300) Subject: Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=281945f42720e61bd4c373b37e379713b8a10037;p=python Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw stream's read() returns more bytes than requested. --- 281945f42720e61bd4c373b37e379713b8a10037 diff --cc Misc/NEWS index a90466e822,cb1a33a9a6..6a4a534ed8 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -18,128 -15,120 +18,131 @@@ Core and Builtin - Issue #17644: Fix a crash in str.format when curly braces are used in square brackets. -- Issue #17983: Raise a SyntaxError for a ``global __class__`` statement in a - class body. +- Issue #17237: Fix crash in the ASCII decoder on m68k. -- Issue #17927: Frame objects kept arguments alive if they had been copied into - a cell, even if the cell was cleared. +- Issue #17927: Frame objects kept arguments alive if they had been + copied into a cell, even if the cell was cleared. -Library -------- +- Issue #1545463: At shutdown, defer finalization of codec modules so + that stderr remains usable. -- Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw - stream's read() returns more bytes than requested. +- Issue #7330: Implement width and precision (ex: "%5.3s") for the format + string of PyUnicode_FromFormat() function, original patch written by Ysj Ray. -- Issue #18011: base64.b32decode() now raises a binascii.Error if there are - non-alphabet characters present in the input string to conform a docstring. - Updated the module documentation. +- Issue #1545463: Global variables caught in reference cycles are now + garbage-collected at shutdown. -- Issue #13772: Restored directory detection of targets in ``os.symlink`` on - Windows, which was temporarily removed in Python 3.2.3 due to an incomplete - implementation. The implementation now works even if the symlink is created - in a location other than the current directory. +- Issue #17094: Clear stale thread states after fork(). Note that this + is a potentially disruptive change since it may release some system + resources which would otherwise remain perpetually alive (e.g. database + connections kept in thread-local storage). -- Issue #16986: ElementTree now correctly parses a string input not only when - an internal XML encoding is UTF-8 or US-ASCII. +- Issue #17408: Avoid using an obsolete instance of the copyreg module when + the interpreter is shutdown and then started again. -- Issue #17812: Fixed quadratic complexity of base64.b32encode(). +- Issue #5845: Enable tab-completion in the interactive interpreter by + default, thanks to a new sys.__interactivehook__. -- Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of - service using certificates with many wildcards (CVE-2013-2099). +- Issue #17115,17116: Module initialization now includes setting __package__ and + __loader__ attributes to None. -- Issue #17981: Closed socket on error in SysLogHandler. +- Issue #17853: Ensure locals of a class that shadow free variables always win + over the closures. -- Fix typos in the multiprocessing module. +- Issue #17863: In the interactive console, don't loop forever if the encoding + can't be fetched from stdin. -- Issue #17754: Make ctypes.util.find_library() independent of the locale. +- Issue #17867: Raise an ImportError if __import__ is not found in __builtins__. -- Issue #17968: Fix memory leak in os.listxattr(). +- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, + such as was shipped with Centos 5 and Mac OS X 10.4. -- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X - with port None or "0" and flags AI_NUMERICSERV. +- Issue #17413: sys.settrace callbacks were being passed a string instead of an + exception instance for the 'value' element of the arg tuple if the exception + originated from C code; now an exception instance is always provided. -IDLE ----- +- Issue #17782: Fix undefined behaviour on platforms where + ``struct timespec``'s "tv_nsec" member is not a C long. -- Issue #15392: Create a unittest framework for IDLE. - Rajagopalasarma Jayakrishnan - -- Issue #14146: Highlight source line while debugging on Windows. +- Issue #17722: When looking up __round__, resolve descriptors. -- Issue #17532: Always include Options menu for IDLE on OS X. - Patch by Guilherme Simões. +- Issue #16061: Speed up str.replace() for replacing 1-character strings. -Tests ------ +- Issue #17715: Fix segmentation fault from raising an exception in a __trunc__ + method. -- Issue #11995: test_pydoc doesn't import all sys.path modules anymore. +- Issue #17643: Add __callback__ attribute to weakref.ref. -Documentation -------------- +- Issue #16447: Fixed potential segmentation fault when setting __name__ on a + class. -- Issue #17953: Mention that you shouldn't replace sys.modules and deleting key - items will cause Python to not be happy. +- Issue #17669: Fix crash involving finalization of generators using yield from. -- Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs. +- Issue #14439: Python now prints the traceback on runpy failure at startup. -- Issue #14097: improve the "introduction" page of the tutorial. +- Issue #17469: Fix _Py_GetAllocatedBlocks() and sys.getallocatedblocks() + when running on valgrind. -- Issue #17977: The documentation for the cadefault argument's default value - in urllib.request.urlopen() is fixed to match the code. +- Issue #17619: Make input() check for Ctrl-C correctly on Windows. +- Issue #17357: Add missing verbosity messages for -v/-vv that were lost during + the importlib transition. -What's New in Python 3.3.2? -=========================== +- Issue #17610: Don't rely on non-standard behavior of the C qsort() function. -*Release date: 13-May-2013* +- Issue #17323: The "[X refs, Y blocks]" printed by debug builds has been + disabled by default. It can be re-enabled with the `-X showrefcount` option. -Core and Builtins ------------------ +Library +------- -- Issue #17237: Fix crash in the ASCII decoder on m68k. ++- Issue #18025: Fixed a segfault in io.BufferedIOBase.readinto() when raw ++ stream's read() returns more bytes than requested. + -- Issue #17408: Avoid using an obsolete instance of the copyreg module when - the interpreter is shutdown and then started again. +- Issue #18011: base64.b32decode() now raises a binascii.Error if there are + non-alphabet characters present in the input string to conform a docstring. + Updated the module documentation. -- Issue #17863: In the interactive console, don't loop forever if the encoding - can't be fetched from stdin. +- Issue #18072: Implement importlib.abc.InspectLoader.get_code() and + importlib.abc.ExecutionLoader.get_code(). -- Issue #17867: Raise an ImportError if __import__ is not found in __builtins__. +- Issue #8240: Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag on SSL + sockets. -- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3, - such as was shipped with Centos 5 and Mac OS X 10.4. +- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X + with port None or "0" and flags AI_NUMERICSERV. -- Issue #17413: sys.settrace callbacks were being passed a string instead of an - exception instance for the 'value' element of the arg tuple if the exception - originated from C code; now an exception instance is always provided. +- Issue #16986: ElementTree now correctly parses a string input not only when + an internal XML encoding is UTF-8 or US-ASCII. -- Issue #17782: Fix undefined behaviour on platforms where - ``struct timespec``'s "tv_nsec" member is not a C long. +- Issue #17996: socket module now exposes AF_LINK constant on BSD and OSX. -- Issue #17715: Fix segmentation fault from raising an exception in a __trunc__ - method. +- Issue #17900: Allowed pickling of recursive OrderedDicts. Decreased pickled + size and pickling time. -- Issue #16447: Fixed potential segmentation fault when setting __name__ on a - class. +- Issue #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an + initial patch by Trent Nelson. -- Issue #17669: Fix crash involving finalization of generators using yield from. +- Issue #17812: Fixed quadratic complexity of base64.b32encode(). + Optimize base64.b32encode() and base64.b32decode() (speed up to 3x). -- Issue #17619: Make input() check for Ctrl-C correctly on Windows. +- Issue #17980: Fix possible abuse of ssl.match_hostname() for denial of + service using certificates with many wildcards (CVE-2013-2099). -- Issue #17610: Don't rely on non-standard behavior of the C qsort() function. +- Issue #15758: Fix FileIO.readall() so it no longer has O(n**2) complexity. -- Issue #17357: Add missing verbosity output when using -v/-vv. +- Issue #14596: The struct.Struct() objects now use more compact implementation. -Library -------- +- Issue #17981: Closed socket on error in SysLogHandler. + +- Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function + is long, not int. + +- Fix typos in the multiprocessing module. + +- Issue #17754: Make ctypes.util.find_library() independent of the locale. + +- Issue #17968: Fix memory leak in os.listxattr(). - Issue #17606: Fixed support of encoded byte strings in the XMLGenerator characters() and ignorableWhitespace() methods. Original patch by Sebastian