Issue 34658: subprocess with preexec_fn when fork() fails could corrupt PyErr state (original) (raw)
Issue34658
Created on 2018-09-13 10:57 by gregory.p.smith, last changed 2022-04-11 14:59 by admin. This issue is now closed.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 9255 | merged | gregory.p.smith,2018-09-13 11:03 | |
PR 9256 | merged | miss-islington,2018-09-13 11:30 | |
PR 9292 | closed | gregory.p.smith,2018-09-14 05:19 |
Messages (3) | ||
---|---|---|
msg325238 - (view) | Author: Gregory P. Smith (gregory.p.smith) * ![]() |
Date: 2018-09-13 10:57 |
Found in the stdlib test suite while testing the fix for bpo-6721: When subprocess is called with a preexec_fn and os.register_at_fork has been used and the fork() system call fails, the Python error state is set before the "after fork in parent process" function calls that were registered were called. So they'd call back into Python code with a pending unreturned exception set. boom. SystemError (or assertion failure in pydebug builds). | ||
msg325239 - (view) | Author: miss-islington (miss-islington) | Date: 2018-09-13 11:30 |
New changeset a20b6adb5a5880fd22c099961eb9f9787739cefe by Miss Islington (bot) (Gregory P. Smith) in branch 'master': bpo-34658: Fix rare subprocess prexec_fn fork error. (GH-9255) https://github.com/python/cpython/commit/a20b6adb5a5880fd22c099961eb9f9787739cefe | ||
msg325265 - (view) | Author: miss-islington (miss-islington) | Date: 2018-09-13 17:11 |
New changeset b2ff9a9f9298761985aa85aa3f42421ce6effb9e by Miss Islington (bot) in branch '3.7': bpo-34658: Fix rare subprocess prexec_fn fork error. (GH-9255) https://github.com/python/cpython/commit/b2ff9a9f9298761985aa85aa3f42421ce6effb9e |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:05 | admin | set | github: 78839 |
2018-09-14 05:24:27 | gregory.p.smith | set | status: open -> closedstage: patch review -> commit reviewresolution: fixedversions: - Python 3.6 |
2018-09-14 05:19:38 | gregory.p.smith | set | pull_requests: + <pull%5Frequest8723> |
2018-09-13 17:11:03 | miss-islington | set | messages: + |
2018-09-13 11:30:23 | miss-islington | set | pull_requests: + <pull%5Frequest8688> |
2018-09-13 11:30:15 | miss-islington | set | nosy: + miss-islingtonmessages: + |
2018-09-13 11:04:43 | gregory.p.smith | set | components: + Extension Modules |
2018-09-13 11:03:14 | gregory.p.smith | set | keywords: + patchpull_requests: + <pull%5Frequest8687> |
2018-09-13 10:57:49 | gregory.p.smith | set | type: behaviorstage: patch review |
2018-09-13 10:57:27 | gregory.p.smith | create |