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

Profiling certain invalid calls crashes Python #78307

Closed
jdemeyer opened this issue Jul 16, 2018 · 7 comments
Closed

Profiling certain invalid calls crashes Python #78307

jdemeyer opened this issue Jul 16, 2018 · 7 comments
Labels
3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@jdemeyer
Copy link
Contributor

BPO 34126
Nosy @vstinner, @serhiy-storchaka, @jdemeyer
PRs
  • bpo-34126: fix crashes while profiling certain invalid calls #8300
  • [3.7] bpo-34126: Fix crashes while profiling invalid calls. (GH-8300) #8371
  • 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 = None
    closed_at = <Date 2018-08-03.20:23:39.594>
    created_at = <Date 2018-07-16.17:17:10.554>
    labels = ['interpreter-core', '3.7', '3.8', 'type-crash']
    title = 'Profiling certain invalid calls crashes Python'
    updated_at = <Date 2018-08-03.20:23:39.593>
    user = 'https://github.com/jdemeyer'

    bugs.python.org fields:

    activity = <Date 2018-08-03.20:23:39.593>
    actor = 'jdemeyer'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-08-03.20:23:39.594>
    closer = 'jdemeyer'
    components = ['Interpreter Core']
    creation = <Date 2018-07-16.17:17:10.554>
    creator = 'jdemeyer'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34126
    keywords = ['patch']
    message_count = 7.0
    messages = ['321747', '321749', '321751', '322088', '322107', '322108', '322197']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'serhiy.storchaka', 'jdemeyer']
    pr_nums = ['8300', '8371']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue34126'
    versions = ['Python 3.7', 'Python 3.8']

    @jdemeyer
    Copy link
    Contributor Author

    >>> import sys; sys.setprofile(lambda *args:None)
    >>> dict.get()
    Segmentation fault

    @jdemeyer jdemeyer added 3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jul 16, 2018
    @jdemeyer
    Copy link
    Contributor Author

    Simple patch coming up...

    @jdemeyer
    Copy link
    Contributor Author

    Also:

        >>> import sys; sys.setprofile(lambda *args: None)
        >>> dict.get([], "foo")
        Segmentation fault

    @jdemeyer jdemeyer changed the title Profiling dict.get() crashes Python Profiling certain invalid calls crash Python Jul 16, 2018
    @pppery pppery mannequin added the type-crash A hard crash of the interpreter, possibly with a core dump label Jul 16, 2018
    @pppery pppery mannequin changed the title Profiling certain invalid calls crash Python Profiling certain invalid calls crashes Python Jul 16, 2018
    @serhiy-storchaka
    Copy link
    Member

    New changeset 56868f9 by Serhiy Storchaka (jdemeyer) in branch 'master':
    bpo-34126: Fix crashes while profiling invalid calls. (GH-8300)
    56868f9

    @serhiy-storchaka
    Copy link
    Member

    New changeset 7638eb8 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7':
    bpo-34126: Fix crashes while profiling invalid calls. (GH-8300) (GH-8371)
    7638eb8

    @serhiy-storchaka
    Copy link
    Member

    Thank you for your contribution Jeroen.

    @vstinner
    Copy link
    Member

    The new test_sys_setprofile.test_unbound_method_invalid_args() test leaks Python references and spotted an old reference leak: bpo-34190.

    @vstinner vstinner reopened this Jul 23, 2018
    @jdemeyer jdemeyer closed this as completed Aug 3, 2018
    @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
    3.7 (EOL) end of life 3.8 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants