This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: multiprocessing: Possible uninitialized pointer use in Windows builds
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: berker.peksag Nosy List: Rosuav, berker.peksag, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2016-07-22 15:12 by Rosuav, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
uninitialized-pointer.patch Rosuav, 2016-07-22 15:12 review
issue27591_v2.diff berker.peksag, 2016-07-23 00:03 review
Messages (11)
msg270991 - (view) Author: Chris Angelico (Rosuav) * Date: 2016-07-22 15:12
Originally reported (if you can call it "reported") here: http://www.viva64.com/en/b/0414/

AFAICT, this is an easy and inconsequential fix.
msg270992 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-07-22 15:27
LGTM
msg270995 - (view) Author: Chris Angelico (Rosuav) * Date: 2016-07-22 15:54
Berker, I don't push code to CPython (I have the commitbit for PEP editing), so do you want to push that?
msg271000 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-07-22 16:34
Yes, that's why I assigned it to myself :) Thanks for the patch!
msg271001 - (view) Author: Chris Angelico (Rosuav) * Date: 2016-07-22 16:37
Cool cool! Then someone will need to notify the PVS-Studio people that we've fixed the two bugs that are actually our bugs :)
msg271003 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-07-22 17:40
It's a little strange that nobody reports a multiprocessing crash on Windows before. It looks like ResetEvent() is called with a random number (coming from the uninitialized stack memory).

Windows is probably smart and does nothing if the argument is not a known handle of an event object.
msg271004 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-07-22 17:41
I suggested a different way to fix the issue on the review.

Python 2.7 is not affected by the bug, but Python 3.5 and 3.6 are affected.
msg271044 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-07-23 00:03
Here is an updated patch. Thanks, Victor.
msg271045 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-07-23 00:06
issue27591_v2.diff LGTM except of a minor comment (PEP 7!) on the review.
msg271051 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-07-23 04:13
New changeset da955567d7c7 by Berker Peksag in branch '3.5':
Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false
https://hg.python.org/cpython/rev/da955567d7c7

New changeset d5f796da4013 by Berker Peksag in branch 'default':
Issue #27591: Merge from 3.5
https://hg.python.org/cpython/rev/d5f796da4013
msg271053 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-07-23 04:16
Thanks! I should read PEP 7 again :)
History
Date User Action Args
2022-04-11 14:58:34adminsetgithub: 71778
2016-07-23 04:16:16berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg271053

stage: patch review -> resolved
2016-07-23 04:13:47python-devsetnosy: + python-dev
messages: + msg271051
2016-07-23 00:06:51vstinnersetmessages: + msg271045
2016-07-23 00:03:47berker.peksagsetfiles: + issue27591_v2.diff

messages: + msg271044
2016-07-22 17:41:20vstinnersetmessages: + msg271004
2016-07-22 17:40:40vstinnersetnosy: + vstinner
messages: + msg271003
2016-07-22 16:37:15Rosuavsetmessages: + msg271001
2016-07-22 16:34:02berker.peksagsetmessages: + msg271000
2016-07-22 15:54:42Rosuavsetmessages: + msg270995
2016-07-22 15:27:56berker.peksagsetassignee: berker.peksag
type: behavior
components: + Extension Modules
versions: + Python 3.5
nosy: + berker.peksag

messages: + msg270992
stage: patch review
2016-07-22 15:12:39Rosuavcreate