Issue 36279: os.wait3() leaks some uninitialized stack when no processes exist (original) (raw)

Issue36279

Created on 2019-03-13 03:27 by dw, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
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') 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
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) https://github.com/python/cpython/commit/682107cf458578ee6bd92b7cc6862113034a4fad
History
Date User Action Args
2022-04-11 14:59:12 admin set github: 80460
2019-09-09 15:48:35 twouters set nosy: + twoutersmessages: +
2019-08-04 18:27:23 ZackerySpytz set pull_requests: + <pull%5Frequest14853>
2019-07-26 08:49:18 dw set status: open -> closedfiles: + c805d2764e6a0ee4d22a338c5f4fef6154df8687.diffmessages: + resolution: out of datestage: patch review -> resolved
2019-03-13 10:16:29 SilentGhost set nosy: + neologixtype: resource usagecomponents: + Library (Lib)versions: + Python 3.7, Python 3.8
2019-03-13 03:52:05 python-dev set keywords: + patchstage: patch reviewpull_requests: + <pull%5Frequest12278>
2019-03-13 03:27:40 dw create