[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +861 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-15 Thread STINNER Victor
STINNER Victor added the comment: Ok fine ;-) Let's keep #if defined(HAVE_WEXECV) || defined(HAVE_WSPAWNV). -- ___ Python tracker ___

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-15 Thread Steve Dower
Steve Dower added the comment: We already use HAVE_WEXECV and HAVE_WSPAWNV elsewhere to choose the wide-char versions of these functions. You've got a few changes to make if you want to maintain consistency. Personally I prefer feature flags to platform flags, then let pyconfig.h control them

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-15 Thread STINNER Victor
STINNER Victor added the comment: > #if defined(HAVE_WEXECV) || defined(HAVE_WSPAWNV) Hum, can't we use MS_WINDOWS here? Or maybe pass a parameter in parse_envlist() for Windows? -- ___ Python tracker

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-15 Thread Berker Peksag
Berker Peksag added the comment: Thanks for the patch, Eryk! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8d80a4291ddc by Berker Peksag in branch '3.6': Issue #28114: Fix a crash in parse_envlist() when env contains byte strings https://hg.python.org/cpython/rev/8d80a4291ddc New changeset 8ad99fdc84a3 by Berker Peksag in branch 'default': Issue #28114:

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-14 Thread Berker Peksag
Berker Peksag added the comment: Eryk's patch looks good to me, thanks! I will wait for others to review the patch. -- ___ Python tracker ___ ___

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-14 Thread Eryk Sun
Changes by Eryk Sun : Added file: http://bugs.python.org/file44663/issue_28114_03.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-14 Thread Eryk Sun
Eryk Sun added the comment: Thanks for the spawn test framework, Victor. I've added a use_bytes argument to encode the args and env using os.fsencode. It's encoding args as well because parse_arglist calls fsconvert_strdup, which was assuming Unicode strings on Windows instead of first calling

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-14 Thread STINNER Victor
STINNER Victor added the comment: Berker and/or Eryksun: Please write unit tests for your patch. I just added a new SpawnTests to test_os which tests all os.spawn*() functions. Please add at least one unit test with env contains a bytes key/value entry. Maybe add a use_bytes=False parameter to

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0ca42273c714 by Victor Stinner in branch '3.6': Issue #28114: Add unit tests on os.spawn*() https://hg.python.org/cpython/rev/0ca42273c714 -- nosy: +python-dev ___ Python tracker

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-14 Thread Eryk Sun
Eryk Sun added the comment: Berker, this is basically what I had in my initial patch on the Unix side. I also addressed the Windows issues in parse_envlist and fsconvert_strdup. I'm uploading that patch for reference. It needs a test. I also need to verify that there are no additional problems

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-14 Thread STINNER Victor
STINNER Victor added the comment: The issue is not specific to Windows, the following example also crash on Linux: import os, sys args = [sys.executable, "-c", "pass"] os.execve(args[0], args, os.environb) -- ___ Python tracker

[issue28114] parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings

2016-09-14 Thread STINNER Victor
Changes by STINNER Victor : -- title: Crash in unicodeobject.c find_maxchar_surrogates on python-3.6.0b1 for Windows -> parse_envlist(): os.execve(), os.spawnve(), etc. crash in Python 3.6.0 when env contains byte strings ___ Python tracker