cpython/Modules
Miss Islington (bot) 57db13e582
bpo-32844: Fix a subprocess misredirection of a low fd (GH5689)
bpo-32844: subprocess: Fix a potential misredirection of a low fd to stderr.

When redirecting, subprocess attempts to achieve the following state:
each fd to be redirected to is less than or equal to the fd
it is redirected from, which is necessary because redirection
occurs in the ascending order of destination descriptors.
It fails to do so in a couple of corner cases,
for example, if 1 is redirected to 2 and 0 is closed in the parent.
(cherry picked from commit 0e7144b064)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
2018-03-26 13:43:46 -07:00
..
_blake2 bpo-31933: fix blake2 multi-byte params on big endian platforms (GH-4250) (#4262) 2017-11-03 20:55:54 +01:00
_ctypes [3.6] bpo-30353: Fix pass by value for structs on 64-bit Cygwin/MinGW (GH-1559) (GH-5954) 2018-03-08 10:28:53 -05:00
_decimal [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0 (#3518) 2017-09-12 16:09:44 -07:00
_io bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754) 2018-02-24 09:43:05 -08:00
_multiprocessing require a long long data type (closes #27961) 2016-09-05 17:44:18 -07:00
_sha3 Don't define PY_WITH_KECCAK 2016-09-21 14:36:44 +02:00
_sqlite bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (GH-3958) (#4303) 2017-11-06 16:45:19 -08:00
cjkcodecs [3.6] bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0 (#3518) 2017-09-12 16:09:44 -07:00
clinic [3.6] bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832). (GH-5906) 2018-02-27 03:39:53 +02:00
expat bpo-31170: Update libexpat from 2.2.3 to 2.2.4 (#3315) (#3350) 2017-09-06 01:30:22 +02:00
zlib - Issue #29169: Update zlib to 1.2.10. 2017-01-31 13:49:48 +01:00
_asynciomodule.c bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) 2018-02-13 22:15:24 +09:00
_bisectmodule.c The return type of a rich comparison is an int 2016-02-14 01:41:35 -08:00
_bz2module.c bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) 2018-02-13 22:15:24 +09:00
_codecsmodule.c Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529) 2016-09-08 10:35:16 -07:00
_collectionsmodule.c [3.6] bpo-31586: Use _count_element fast path for real dicts. (#3776) 2017-09-26 20:45:57 -07:00
_cryptmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
_csv.c bpo-32255: Always quote a single empty field when write into a CSV file. (GH-4769) (#4810) 2017-12-12 12:56:40 +02:00
_curses_panel.c Issue #25745: Fixed leaking a userptr in curses panel destructor. 2016-05-09 00:14:22 +03:00
_cursesmodule.c correct the typos (GH-4950) (#4951) 2017-12-21 07:43:11 +02:00
_datetimemodule.c [3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522) 2018-02-03 21:00:24 -05:00
_dbmmodule.c [3.6] bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832). (GH-5906) 2018-02-27 03:39:53 +02:00
_elementtree.c [3.6] bpo-31728: Prevent crashes in _elementtree due to unsafe cleanup of Element.text and Element.tail (GH-3924) (#3945) 2017-10-11 00:51:28 +03:00
_functoolsmodule.c bpo-31095: fix potential crash during GC (GH-3195) 2017-09-04 12:31:09 +09:00
_gdbmmodule.c [3.6] bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832). (GH-5906) 2018-02-27 03:39:53 +02:00
_hashopenssl.c bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) 2018-02-13 22:15:24 +09:00
_heapqmodule.c Issue #15984: Merge PyUnicode doc from 3.5 2016-04-15 02:27:11 +00:00
_json.c [3.6] bpo-31505: Fix an assertion failure in json, in case _json.make_encoder() received a bad encoder() argument. (GH-3643) (#3777) 2017-09-27 08:21:47 +03:00
_localemodule.c [3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192) 2018-01-15 23:23:47 +01:00
_lsprof.c Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString. 2016-11-16 10:19:20 +02:00
_lzmamodule.c bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) 2018-02-13 22:15:24 +09:00
_math.c Fix typo. 2014-10-28 22:24:46 +01:00
_math.h Issue #15477: Add workaround for log1p(-0.0) on platforms where it's broken. 2012-08-18 12:24:30 +01:00
_opcode.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
_operator.c Issue #27809: methodcaller_reduce() uses fast call 2016-08-23 00:23:23 +02:00
_pickle.c bpo-28416: Break reference cycles in Pickler and Unpickler subclasses (GH-4080) (#4653) 2017-11-30 23:30:39 +02:00
_posixsubprocess.c bpo-32844: Fix a subprocess misredirection of a low fd (GH5689) 2018-03-26 13:43:46 -07:00
_randommodule.c [3.6] bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad __abs__() method. (GH-3596) (#3794) 2017-09-28 12:17:51 +03:00
_scproxy.c Eliminate a tautological-pointer-compare warning found by Clang. 2016-09-07 14:07:16 -07:00
_sre.c Issue #29444: Fixed out-of-bounds buffer access in the group() method of 2017-02-04 22:55:40 +02:00
_ssl.c [3.6] bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210) (GH-6214) 2018-03-24 18:38:14 +01:00
_ssl_data.h Issue #23248: Update ssl error codes from latest OpenSSL git master. 2015-01-18 17:39:32 +01:00
_stat.c Issue #21741: Add st_file_attributes to os.stat_result on Windows. 2014-06-19 09:46:37 -05:00
_struct.c [3.6] bpo-30246: fix several error messages which only mention bytes in struct (#3561) 2017-09-14 11:22:23 +08:00
_testbuffer.c Expand the PySlice_GetIndicesEx macro. (#1023) (#1044) 2017-04-08 11:18:14 +03:00
_testcapimodule.c [3.6] bpo-30697: Fix PyErr_NormalizeException() when no memory (GH-2327). (#4135) 2017-10-26 17:48:48 +02:00
_testimportmultiple.c Remove compile warnings for _testimportmodule 2012-12-15 18:16:47 +02:00
_testmultiphase.c bpo-32374: m_traverse may be called with m_state=NULL (GH-5140) 2018-03-16 23:29:30 -07:00
_threadmodule.c [3.6] bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functions (GH-4026) (#4032) 2017-10-18 12:09:57 +03:00
_tkinter.c [3.6] bpo-31675: Fix memory leaks in Tkinter's methods splitlist() and split() (GH-3866) (#3874) 2017-10-03 23:50:46 +03:00
_tracemalloc.c [3.6] bpo-31018: Switch to GH-pragma pack from __declspec(align) (GH-2848) (#2868) 2017-07-25 19:20:38 +02:00
_weakref.c Issue #28427: old keys should not remove new values from 2016-12-27 14:19:20 +01:00
_winapi.c [3.6] bpo-31471: Fix assertion failure in subprocess.Popen() on Windows, in case env has a bad keys() method. (GH-3580) (#3584) 2017-09-14 22:56:31 +03:00
addrinfo.h replace PY_LONG_LONG with long long 2016-09-06 10:46:49 -07:00
ar_beos
arraymodule.c bpo-32020: arraymodule: Correct missing Py_DECREF in failure case of make_array() (GH-4391) (#4392) 2017-11-14 09:01:29 +02:00
atexitmodule.c [3.6] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2121) 2017-06-12 09:02:13 +03:00
audioop.c [3.6] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used to parse non-args. (#3210) 2017-08-26 15:27:50 +03:00
binascii.c Issue #29004: Merge crc_hqx() doc from 3.5 2016-12-24 07:44:03 +00:00
cmathmodule.c Issue 23229: add cmath.inf, cmath.nan, cmath.infj and cmath.nanj. 2016-08-29 13:56:58 +01:00
config.c.in PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
errnomodule.c Fix #13210. Port the Windows build from VS2008 to VS2010. 2012-05-13 11:19:23 -05:00
faulthandler.c [3.6] bpo-32297: Fix misspellings in Python source code comments (GH-4803) (#4864) 2017-12-14 16:19:51 +02:00
fcntlmodule.c Issue #28139: Fix messed up indentation 2016-09-17 03:26:16 +00:00
fpectlmodule.c Issue #16136: Remove VMS support and VMS-related code 2013-12-21 16:19:10 +01:00
fpetestmodule.c
gc_weakref.txt Issue #13575: there is only one class type. 2011-12-12 18:54:29 +01:00
gcmodule.c Don't run garbage collection on interpreter exit if it was explicitly disabled 2016-09-09 21:47:46 -07:00
getaddrinfo.c Issue #26505: merge from 3.5 2016-03-07 14:52:46 -05:00
getbuildinfo.c [3.6] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454) 2017-03-04 01:05:06 -05:00
getnameinfo.c Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code. 2012-08-02 20:37:12 +02:00
getpath.c [3.6] closes bpo-31532: Fix memory corruption due to allocator mix (GH-3679) (#3681) 2017-09-20 23:47:12 -07:00
grpmodule.c [3.6] bpo-13617: Reject embedded null characters in wchar* strings. (GH-2302) (#2462) 2017-06-28 09:27:35 +03:00
hashlib.h Issue #26798: Add BLAKE2 (blake2b and blake2s) to hashlib. 2016-09-06 22:03:25 +02:00
hashtable.c Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy(). 2016-09-13 20:22:02 +02:00
hashtable.h Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy(). 2016-09-13 20:22:02 +02:00
itertoolsmodule.c [3.6] bpo-30347: Stop crashes when concurrently iterate over itertools.groupby() iterators. (GH-1557) (#3770) 2017-09-26 22:20:22 +03:00
ld_so_aix.in Issue #10656: Fix out-of-tree building on AIX 2016-11-20 07:56:37 +00:00
ld_so_beos
main.c bpo-17232: Clarify docs for -O and -OO command line options (GH-5839) 2018-02-24 19:46:16 -08:00
makesetup generate spaces instead of tabs into config.c 2017-01-16 00:05:12 -08:00
makexp_aix
mathmodule.c Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
md5module.c [3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522) 2018-02-03 21:00:24 -05:00
mmapmodule.c Fix typos in mmap() error messages (GH-6173) 2018-03-21 00:07:23 -07:00
nismodule.c [3.6] bpo-13617: Reject embedded null characters in wchar* strings. (GH-2302) (#2462) 2017-06-28 09:27:35 +03:00
ossaudiodev.c Issue #28715: Added error checks for PyUnicode_AsUTF8(). 2016-11-20 08:48:07 +02:00
overlapped.c [3.6] bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (GH-2285) (#2443) 2017-06-27 21:08:58 +03:00
parsermodule.c [3.6] bpo-30070: Fixed leaks and crashes in errors handling in the parser module. (GH-1131). (#1184) 2017-04-19 23:22:19 +03:00
posixmodule.c bpo-33016: Fix potential use of uninitialized memory in nt._getfinalpathname (GH-6032) 2018-03-08 14:50:30 -08:00
posixmodule.h Issue #4591: Uid and gid values larger than 2**31 are supported now. 2013-02-12 09:24:16 +02:00
pwdmodule.c [3.6] bpo-13617: Reject embedded null characters in wchar* strings. (GH-2302) (#2462) 2017-06-28 09:27:35 +03:00
pyexpat.c bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) (#2200) 2017-06-15 01:26:16 +02:00
readline.c [3.6] bpo-29854: Fix segfault in call_readline() (GH-728) 2017-07-08 21:51:21 +03:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
resource.c Issue #20191: Fixed a crash in resource.prlimit() when pass a sequence that 2016-12-19 08:05:39 +02:00
rotatingtree.c
rotatingtree.h
selectmodule.c bpo-31893: Fix errors in b9052a0f91. (GH-4196) (#4201) 2017-10-31 20:16:07 +02:00
Setup.config.in remove --with(out)-signal-module, since the signal module is non-optional 2016-09-09 12:01:10 -07:00
Setup.dist [3.6] Add missing _sha3 module to Setup.dist (GH-2395) (#3280) 2017-09-04 10:08:35 -07:00
sha1module.c replace PY_LONG_LONG with long long 2016-09-06 10:46:49 -07:00
sha256module.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
sha512module.c stop using Py_LL and Py_ULL 2016-09-18 18:12:21 -07:00
signalmodule.c bpo-30057: Fix potential missed signal in signal.signal(). (GH-4258) (#4261) 2017-11-03 20:23:12 +01:00
socketmodule.c Fix _socket module compilation on Cygwin. (GH-4137) (GH-4145) 2018-02-26 22:24:18 +02:00
socketmodule.h [3.6] bpo-31927: Fix bugs in socketmodule.c on NetBSD and other issues. (GH-4235) (#4352) 2017-11-09 21:40:29 +02:00
spwdmodule.c [3.6] bpo-13617: Reject embedded null characters in wchar* strings. (GH-2302) (#2462) 2017-06-28 09:27:35 +03:00
sre.h Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:36:56 +02:00
sre_constants.h Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:36:56 +02:00
sre_lib.h replace Py_(u)intptr_t with the c99 standard types 2016-09-06 13:47:26 -07:00
symtablemodule.c Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations. 2016-09-08 20:50:03 -07:00
syslogmodule.c Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize 2016-11-20 09:13:07 +02:00
termios.c
testcapi_long.h Issue #9530: Fix undefined behaviour due to signed overflow in testcapi_long.h. 2011-11-19 17:58:15 +00:00
timemodule.c [3.6] bpo-31806: Use _PyTime_ROUND_TIMEOUT for the timeout argument parsing in more functions (GH-4026) (#4032) 2017-10-18 12:09:57 +03:00
tkappinit.c Issue #4350: Removed a number of out-of-dated and non-working for a long time 2014-07-23 22:33:50 +03:00
tkinter.h Issue #16840. Turn off bignum support in tkinter with with Tcl earlier than 8.5.8 2015-04-22 10:59:32 +03:00
unicodedata.c Add an extra byte for null in case we ever get very long unicode names. 2016-09-23 20:21:20 +02:00
unicodedata_db.h Unicode 9.0.0 2016-09-14 23:53:47 -07:00
unicodename_db.h Unicode 9.0.0 2016-09-14 23:53:47 -07:00
winreparse.h Issue #17599: Use unique _Py_REPARSE_DATA_BUFFER etc names to avoid conflict 2016-08-04 02:38:59 +00:00
xxlimited.c merge 3.5 (#29398) 2017-01-31 23:31:10 -08:00
xxmodule.c Issue #25923: Added more const qualifiers to signatures of static and private functions. 2015-12-25 20:01:53 +02:00
xxsubtype.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
zipimport.c [3.6] bpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() (GH-3226) (#3243) 2017-08-30 14:08:39 +03:00
zlibmodule.c bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988) 2018-03-06 21:46:10 -08:00

Source files for standard library extension modules,
and former extension modules that are now builtin modules.