Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-30602: Fix lastarg in os.spawnve() #2287

Merged
merged 1 commit into from
Jun 23, 2017
Merged

bpo-30602: Fix lastarg in os.spawnve() #2287

merged 1 commit into from
Jun 23, 2017

Conversation

vstinner
Copy link
Member

Fix a regression introduced by myself in the commit
526b226.

@vstinner
Copy link
Member Author

@eryksun: Would you mind to review this change please?

@@ -5266,7 +5266,7 @@ os_spawnve_impl(PyObject *module, int mode, path_t *path, PyObject *argv,
goto fail_1;
}
if (i == 0 && !argvlist[0][0]) {
lastarg = i;
lastarg = i + 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can restore the initial value to Py_ssize_t lastarg = 0. But leaving it as -1 shouldn't be a problem since failures before this loop go to fail_0 instead of fail_1.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Fix a regression introduced by myself in the commit
526b226.
@vstinner
Copy link
Member Author

@eryksun: I made the requested change. Does it look good to you now?

@vstinner
Copy link
Member Author

FYI I also tested manually that I didn't reintroduced a reference leak: "python -m test -R 3:3 test_os" succeed on Windows with this change.

@vstinner vstinner merged commit c8d6ab2 into python:master Jun 23, 2017
@vstinner vstinner deleted the spawnve branch June 23, 2017 13:04
vstinner added a commit that referenced this pull request Jun 23, 2017
Fix a regression introduced by myself in the commit
526b226.
(cherry picked from commit c8d6ab2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants