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

Created on 2019-03-13 03:27 by dw, last changed 2019-03-13 10:16 by SilentGhost.

Pull Requests
URL Status Linked Edit
PR 12303 open python-dev, 2019-03-13 03:52
Messages (1)
msg337833 - (view) Author: David Wilson (dw) * Date: 2019-03-13 03:27
Not sure if this is worth reporting..

p = os.popen('sleep 1234')
os.wait3(os.WNOHANG)
os.wait3(os.WNOHANG)
os.wait3(os.WNOHANG)

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
History
Date User Action Args
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