Skip to content

bpo-31446: copy command line that should be passed to CreateProcessW#11141

Merged
serhiy-storchaka merged 3 commits into
python:masterfrom
vladima:copy-command-line
Dec 14, 2018
Merged

bpo-31446: copy command line that should be passed to CreateProcessW#11141
serhiy-storchaka merged 3 commits into
python:masterfrom
vladima:copy-command-line

Conversation

@vladima
Copy link
Copy Markdown
Contributor

@vladima vladima commented Dec 13, 2018

Create a copy of the buffer containing the command line before passing it to CreateProcessW - internally this function can mutate input buffer and this effect is observable for other users that can work with the same input string in different threads.

https://bugs.python.org/issue31446

Comment thread Modules/_winapi.c Outdated
Comment thread Modules/_winapi.c Outdated
@serhiy-storchaka
Copy link
Copy Markdown
Member

Great! I wanted to suggest the same as @eryksun.

@serhiy-storchaka serhiy-storchaka added type-bug An unexpected behavior, bug, or error needs backport to 3.6 labels Dec 14, 2018
@serhiy-storchaka serhiy-storchaka merged commit 7b36016 into python:master Dec 14, 2018
@miss-islington
Copy link
Copy Markdown
Contributor

Thanks @vladima for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6, 3.7.
🐍🍒⛏🤖

@miss-islington
Copy link
Copy Markdown
Contributor

Sorry, @vladima and @serhiy-storchaka, I could not cleanly backport this to 3.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7b36016a15aeed0d76a4c05a66203e6d7723aace 3.7

@miss-islington
Copy link
Copy Markdown
Contributor

Sorry, @vladima and @serhiy-storchaka, I could not cleanly backport this to 3.6 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7b36016a15aeed0d76a4c05a66203e6d7723aace 3.6

@miss-islington
Copy link
Copy Markdown
Contributor

Sorry, @vladima and @serhiy-storchaka, I could not cleanly backport this to 2.7 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 7b36016a15aeed0d76a4c05a66203e6d7723aace 2.7

serhiy-storchaka pushed a commit to serhiy-storchaka/cpython that referenced this pull request Dec 14, 2018
…cessW(). (pythonGH-11141).

(cherry picked from commit 7b36016)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
@bedevere-bot
Copy link
Copy Markdown

GH-11149 is a backport of this pull request to the 3.7 branch.

@serhiy-storchaka serhiy-storchaka removed their assignment Dec 14, 2018
serhiy-storchaka added a commit that referenced this pull request Dec 14, 2018
…cessW(). (GH-11141). (GH-11149)

(cherry picked from commit 7b36016)

Co-authored-by: Vladimir Matveev <v2matveev@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants