GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Dead code in `CALL_FUNCTION_EX` opcode handler · Issue #96751 · python/cpython

Dead code in CALL_FUNCTION_EX opcode handler #96751

New issue
Copy link
New issue
Copy link
Closed
Closed
Dead code in CALL_FUNCTION_EX opcode handler#96751
Copy link
Assignees
markshannon
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@sobolevn
sobolevn
opened on Sep 11, 2022
Issue body actions

I am talking about these lines:

cpython/Python/ceval.c

Lines 4722 to 4734 in a36235d

if (!PyDict_CheckExact(kwargs)) {
PyObject *d = PyDict_New();
if (d == NULL)
goto error;
if (_PyDict_MergeEx(d, kwargs, 2) < 0) {
Py_DECREF(d);
format_kwargs_error(tstate, SECOND(), kwargs);
Py_DECREF(kwargs);
goto error;
}
Py_DECREF(kwargs);
kwargs = d;
}

They are not ever called, because after #18141 all ** dict unpacking is handled in DICT_MERGE opcode.

This was found while working on #94808 but I think that it deserves a separate issue.

PR is on its way.

Activity

  1. sobolevn
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
    on Sep 11, 2022
  2. sobolevn
    added a commit that references this issue on Sep 11, 2022

    pythongh-96751: Remove dead code from `CALL_FUNCTION_EX` opcode

    6e6fe8a
  3. mdboom commented on Sep 11, 2022

    @mdboom
    mdboom
    on Sep 11, 2022
    Contributor
    More actions

    Thanks for taking such an interest in coverage. This is very welcome (but I'll leave it to @markshannon to review the specific change in #96752).

    Reacted by sobolevn
  4. sobolevn
    assigned
    markshannon
    on Sep 12, 2022
  5. markshannon
    added a commit that references this issue on Sep 15, 2022

    gh-96751: Remove dead code from `CALL_FUNCTION_EX` opcode (GH-96752)

    e37ac5f
  6. sobolevn
    closed this as completedon Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @markshannon
    markshannon

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.