[Python-checkins] cpython (merge 3.6 -> default): Merge from 3.6

steve.dower python-checkins at python.org
Sat Nov 19 21:42:06 EST 2016


https://hg.python.org/cpython/rev/22dee3a9cad9
changeset:   105193:22dee3a9cad9
parent:      105190:1465baaccd84
parent:      105192:b3a6cc610ee4
user:        Steve Dower <steve.dower at microsoft.com>
date:        Sat Nov 19 18:41:31 2016 -0800
summary:
  Merge from 3.6

files:
  Misc/NEWS             |  2 ++
  Modules/posixmodule.c |  9 +++++++--
  2 files changed, 9 insertions(+), 2 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -622,6 +622,8 @@
 Library
 -------
 
+- Issue #28732: Fix crash in os.spawnv() with no elements in args
+
 - Issue #28485: Always raise ValueError for negative
   compileall.compile_dir(workers=...) parameter, even when multithreading is
   unavailable.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3347,8 +3347,7 @@
 
 #ifdef MS_WINDOWS
     Py_BEGIN_ALLOW_THREADS
-    if (src->wide)
-        result = CreateHardLinkW(dst->wide, src->wide, NULL);
+    result = CreateHardLinkW(dst->wide, src->wide, NULL);
     Py_END_ALLOW_THREADS
 
     if (!result)
@@ -4111,7 +4110,9 @@
 {
     long result;
     Py_BEGIN_ALLOW_THREADS
+    _Py_BEGIN_SUPPRESS_IPH
     result = _wsystem(command);
+    _Py_END_SUPPRESS_IPH
     Py_END_ALLOW_THREADS
     return result;
 }
@@ -6889,7 +6890,9 @@
 
     do {
         Py_BEGIN_ALLOW_THREADS
+        _Py_BEGIN_SUPPRESS_IPH
         res = _cwait(&status, pid, options);
+        _Py_END_SUPPRESS_IPH
         Py_END_ALLOW_THREADS
     } while (res < 0 && errno == EINTR && !(async_err = PyErr_CheckSignals()));
     if (res < 0)
@@ -8256,6 +8259,7 @@
     attr.bInheritHandle = FALSE;
 
     Py_BEGIN_ALLOW_THREADS
+    _Py_BEGIN_SUPPRESS_IPH
     ok = CreatePipe(&read, &write, &attr, 0);
     if (ok) {
         fds[0] = _open_osfhandle((intptr_t)read, _O_RDONLY);
@@ -8266,6 +8270,7 @@
             ok = 0;
         }
     }
+    _Py_END_SUPPRESS_IPH
     Py_END_ALLOW_THREADS
 
     if (!ok)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list