Title: os.wait3() leaks some uninitialized stack when no processes exist
Type: resource usage Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: dw, neologix, twouters
Priority: normal Keywords: patch

Created on 2019-03-13 03:27 by dw, last changed 2019-09-09 15:48 by twouters. This issue is now closed.

File name Uploaded Description Edit
c805d2764e6a0ee4d22a338c5f4fef6154df8687.diff dw, 2019-07-26 08:49
Pull Requests
URL Status Linked Edit
PR 12303 closed python-dev, 2019-03-13 03:52
PR 15111 merged ZackerySpytz, 2019-08-04 18:27
Messages (3)
msg337833 - (view) Author: David Wilson (dw) * Date: 2019-03-13 03:27
Not sure if this is worth reporting..

p = os.popen('sleep 1234')

Notice struct rusage return value. When wait3() succeeds on Linux, but no child was waiting to be reaped, &ru is not updated by the kernel, therefore it is passed uninitialized back to the user, essentially leaking a little bit of stack memory
msg348484 - (view) Author: David Wilson (dw) * Date: 2019-07-26 08:49
The original diff is attached here (per the old process) so others can find it, and the PR+fork are closed, as carrying a fork in my GitHub for 4 months has non-zero cost. I'm presently more interested in having a clean GH account than carrying around the baggage of forgotten old patches
msg351506 - (view) Author: Thomas Wouters (twouters) * (Python committer) Date: 2019-09-09 15:48
New changeset 682107cf458578ee6bd92b7cc6862113034a4fad by T. Wouters (Zackery Spytz) in branch 'master':
bpo-36279: Ensure os.wait3() rusage is initialized (GH-15111)
Date User Action Args
2019-09-09 15:48:35twouterssetnosy: + twouters
messages: + msg351506
2019-08-04 18:27:23ZackerySpytzsetpull_requests: + pull_request14853
2019-07-26 08:49:18dwsetstatus: open -> closed
files: + c805d2764e6a0ee4d22a338c5f4fef6154df8687.diff
messages: + msg348484

resolution: out of date
stage: patch review -> resolved
2019-03-13 10:16:29SilentGhostsetnosy: + neologix

type: resource usage
components: + Library (Lib)
versions: + Python 3.7, Python 3.8
2019-03-13 03:52:05python-devsetkeywords: + patch
stage: patch review
pull_requests: + pull_request12278
2019-03-13 03:27:40dwcreate