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

Null pointer dereferences in C OrderedDict #68537

Closed
ericsnowcurrently opened this issue Jun 1, 2015 · 2 comments
Closed

Null pointer dereferences in C OrderedDict #68537

ericsnowcurrently opened this issue Jun 1, 2015 · 2 comments
Assignees
Labels
release-blocker stdlib Python modules in the Lib dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@ericsnowcurrently
Copy link
Member

BPO 24349
Nosy @tiran, @ericsnowcurrently, @1st1
Superseder
  • bpo-24347: unchecked return value in C OrderedDict
  • 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/ericsnowcurrently'
    closed_at = <Date 2015-06-02.01:12:07.188>
    created_at = <Date 2015-06-01.16:24:34.675>
    labels = ['library', 'type-crash', 'release-blocker']
    title = 'Null pointer dereferences in C OrderedDict'
    updated_at = <Date 2015-06-02.01:12:07.187>
    user = 'https://github.com/ericsnowcurrently'

    bugs.python.org fields:

    activity = <Date 2015-06-02.01:12:07.187>
    actor = 'eric.snow'
    assignee = 'eric.snow'
    closed = True
    closed_date = <Date 2015-06-02.01:12:07.188>
    closer = 'eric.snow'
    components = ['Library (Lib)']
    creation = <Date 2015-06-01.16:24:34.675>
    creator = 'eric.snow'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 24349
    keywords = []
    message_count = 2.0
    messages = ['244599', '244629']
    nosy_count = 4.0
    nosy_names = ['christian.heimes', 'Arfrever', 'eric.snow', 'yselivanov']
    pr_nums = []
    priority = 'release blocker'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '24347'
    type = 'crash'
    url = 'https://bugs.python.org/issue24349'
    versions = ['Python 3.5', 'Python 3.6']

    @ericsnowcurrently
    Copy link
    Member Author

    (from msg244587 in bpo-16991)

    Coverity has found an issue in odict, too:

    *** CID 1302699:  Null pointer dereferences  (NULL_RETURNS)
    /Objects/odictobject.c: 1316 in odict_copy()
    1310             od_copy = PyObject_CallFunctionObjArgs((PyObject *)Py_TYPE(od), NULL);
    1311         if (od_copy == NULL)
    1312             return NULL;
    1313     
    1314         if (PyODict_CheckExact(od)) {
    1315             _odict_FOREACH(od, node) {
    >>>     CID 1302699:  Null pointer dereferences  (NULL_RETURNS)
    >>>     Dereferencing a pointer that might be null "PyDict_GetItem((PyObject *)(PyObject *)od, node->key)" when calling "PyODict_SetItem".
    1316                 int res = PyODict_SetItem((PyObject *)od_copy,
    1317                                           _odictnode_KEY(node),
    1318                                           _odictnode_VALUE(node, od));
    1319                 if (res != 0)
    1320                     goto fail;
    1321             }

    @ericsnowcurrently ericsnowcurrently self-assigned this Jun 1, 2015
    @ericsnowcurrently ericsnowcurrently added stdlib Python modules in the Lib dir type-crash A hard crash of the interpreter, possibly with a core dump labels Jun 1, 2015
    @ericsnowcurrently
    Copy link
    Member Author

    Correct me if I'm wrong, but this is a duplicate of the bug Stefan reported in bpo-24347.

    @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
    release-blocker stdlib Python modules in the Lib dir type-crash A hard crash of the interpreter, possibly with a core dump
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant