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

A fatal error in test_dictviews #82383

Closed
ZackerySpytz mannequin opened this issue Sep 17, 2019 · 3 comments
Closed

A fatal error in test_dictviews #82383

ZackerySpytz mannequin opened this issue Sep 17, 2019 · 3 comments
Labels
3.9 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

@ZackerySpytz
Copy link
Mannequin

ZackerySpytz mannequin commented Sep 17, 2019

BPO 38202
Nosy @rhettinger, @serhiy-storchaka, @corona10, @ZackerySpytz
PRs
  • bpo-38202: PyObject_GetIter() should be checked for failure #16241
  • 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 2019-10-13.11:52:55.747>
    created_at = <Date 2019-09-17.19:27:01.257>
    labels = ['interpreter-core', '3.9', 'type-crash']
    title = 'A fatal error in test_dictviews'
    updated_at = <Date 2019-10-13.11:52:55.746>
    user = 'https://github.com/ZackerySpytz'

    bugs.python.org fields:

    activity = <Date 2019-10-13.11:52:55.746>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-10-13.11:52:55.747>
    closer = 'serhiy.storchaka'
    components = ['Interpreter Core']
    creation = <Date 2019-09-17.19:27:01.257>
    creator = 'ZackerySpytz'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38202
    keywords = ['patch']
    message_count = 3.0
    messages = ['352658', '354216', '354575']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'serhiy.storchaka', 'corona10', 'ZackerySpytz']
    pr_nums = ['16241']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'crash'
    url = 'https://bugs.python.org/issue38202'
    versions = ['Python 3.9']

    @ZackerySpytz
    Copy link
    Mannequin Author

    ZackerySpytz mannequin commented Sep 17, 2019

    When running test_dictviews, I sometimes encounter a fatal error.

    ./python -m test test_dictviews
    Run tests sequentially
    0:00:00 load avg: 0.36 [1/1] test_dictviews
    python: Objects/typeobject.c:3125: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.
    Fatal Python error: Aborted

    Current thread 0x00007fd5506de140 (most recent call first):
    File "/home/lubuntu2/cpython/Lib/test/test_dictviews.py", line 166 in test_items_set_operations
    File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 617 in _callTestMethod
    File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 663 in run
    File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 725 in __call__
    File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
    File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
    File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
    File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
    File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run
    File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__
    File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run
    File "/home/lubuntu2/cpython/Lib/test/support/init.py", line 1996 in _run_suite
    File "/home/lubuntu2/cpython/Lib/test/support/init.py", line 2092 in run_unittest
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 209 in _test_module
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 409 in run_tests_sequential
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 507 in run_tests
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 674 in _main
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 628 in main
    File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 695 in main
    File "/home/lubuntu2/cpython/Lib/test/main.py", line 2 in <module>
    File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code
    File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main
    Aborted (core dumped)

    It seems that this is because the PyObject_GetIter() call in _PyDictView_Intersect() is not checked for failure.

    @ZackerySpytz ZackerySpytz mannequin added 3.9 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump labels Sep 17, 2019
    @corona10
    Copy link
    Member

    corona10 commented Oct 8, 2019

    Can you finalize the PR 16241 by adding the unit test which @serhiy.storchaka suggested?

    @serhiy-storchaka
    Copy link
    Member

    New changeset b16e382 by Serhiy Storchaka (Zackery Spytz) in branch 'master':
    bpo-38202: Fix a crash in dict_view & non-itearble. (GH-16241)
    b16e382

    @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.9 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

    2 participants