Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiprocessing: Possible uninitialized pointer use in Windows builds #71778

Closed
Rosuav opened this issue Jul 22, 2016 · 11 comments
Closed

multiprocessing: Possible uninitialized pointer use in Windows builds #71778

Rosuav opened this issue Jul 22, 2016 · 11 comments
Assignees
Labels
extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error

Comments

@Rosuav
Copy link
Contributor

Rosuav commented Jul 22, 2016

BPO 27591
Nosy @vstinner, @Rosuav, @berkerpeksag
Files
  • uninitialized-pointer.patch
  • issue27591_v2.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/berkerpeksag'
    closed_at = <Date 2016-07-23.04:16:16.173>
    created_at = <Date 2016-07-22.15:12:39.334>
    labels = ['extension-modules', 'type-bug']
    title = 'multiprocessing: Possible uninitialized pointer use in Windows builds'
    updated_at = <Date 2016-07-23.04:16:16.171>
    user = 'https://github.com/Rosuav'

    bugs.python.org fields:

    activity = <Date 2016-07-23.04:16:16.171>
    actor = 'berker.peksag'
    assignee = 'berker.peksag'
    closed = True
    closed_date = <Date 2016-07-23.04:16:16.173>
    closer = 'berker.peksag'
    components = ['Extension Modules']
    creation = <Date 2016-07-22.15:12:39.334>
    creator = 'Rosuav'
    dependencies = []
    files = ['43832', '43837']
    hgrepos = []
    issue_num = 27591
    keywords = ['patch']
    message_count = 11.0
    messages = ['270991', '270992', '270995', '271000', '271001', '271003', '271004', '271044', '271045', '271051', '271053']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'python-dev', 'Rosuav', 'berker.peksag']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue27591'
    versions = ['Python 3.5', 'Python 3.6']

    @Rosuav
    Copy link
    Contributor Author

    Rosuav commented Jul 22, 2016

    Originally reported (if you can call it "reported") here: http://www.viva64.com/en/b/0414/

    AFAICT, this is an easy and inconsequential fix.

    @berkerpeksag
    Copy link
    Member

    LGTM

    @berkerpeksag berkerpeksag added the extension-modules C modules in the Modules dir label Jul 22, 2016
    @berkerpeksag berkerpeksag self-assigned this Jul 22, 2016
    @berkerpeksag berkerpeksag added the type-bug An unexpected behavior, bug, or error label Jul 22, 2016
    @Rosuav
    Copy link
    Contributor Author

    Rosuav commented Jul 22, 2016

    Berker, I don't push code to CPython (I have the commitbit for PEP editing), so do you want to push that?

    @berkerpeksag
    Copy link
    Member

    Yes, that's why I assigned it to myself :) Thanks for the patch!

    @Rosuav
    Copy link
    Contributor Author

    Rosuav commented Jul 22, 2016

    Cool cool! Then someone will need to notify the PVS-Studio people that we've fixed the two bugs that are actually our bugs :)

    @vstinner
    Copy link
    Member

    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.

    @vstinner
    Copy link
    Member

    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.

    @berkerpeksag
    Copy link
    Member

    Here is an updated patch. Thanks, Victor.

    @vstinner
    Copy link
    Member

    issue27591_v2.diff LGTM except of a minor comment (PEP-7!) on the review.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jul 23, 2016

    New changeset da955567d7c7 by Berker Peksag in branch '3.5':
    Issue bpo-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 bpo-27591: Merge from 3.5
    https://hg.python.org/cpython/rev/d5f796da4013

    @berkerpeksag
    Copy link
    Member

    Thanks! I should read PEP-7 again :)

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    extension-modules C modules in the Modules dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants