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 — Make the correct `call` specialization fail kind show up · Issue #99770 · python/cpython

Make the correct call specialization fail kind show up #99770

New issue
Copy link
New issue
Copy link
Closed
Closed
Make the correct call specialization fail kind show up#99770
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@penguin-wwy
penguin-wwy
opened on Nov 25, 2022
Issue body actions

The SPEC_FAIL_KIND is not displayed correctly due to not being adequately maintained.
e.g

cpython/Python/specialize.c

Lines 1471 to 1482 in b1dcdef

#ifdef Py_STATS
static int
builtin_call_fail_kind(int ml_flags)
{
switch (ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O |
METH_KEYWORDS | METH_METHOD)) {
case METH_VARARGS:
return SPEC_FAIL_CALL_PYCFUNCTION;
case METH_VARARGS | METH_KEYWORDS:
return SPEC_FAIL_CALL_PYCFUNCTION_WITH_KEYWORDS;
case METH_FASTCALL | METH_KEYWORDS:
return SPEC_FAIL_CALL_PYCFUNCTION_FAST_WITH_KEYWORDS;

According to the context, METH_FASTCALL | METH_KEYWORDS flag does not cause specialization failure.
However, the method descr fail kind will also be shown as SPEC_FAIL_CALL_PYCFUNCTION, because builtin_call_fail_kind function is called incorrectly in the specialize_method_descriptor function.

I'd like to submit a PR to fix them and make them display correctly.

Linked PRs

  • gh-99770: Make the correct call specialization fail kind show up #99771

Activity

  1. penguin-wwy
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Nov 25, 2022
  2. penguin-wwy commented on Nov 25, 2022

    @penguin-wwy
    penguin-wwy
    on Nov 25, 2022
    ContributorAuthor
    More actions

    @markshannon Can you please review this issue? Other instruction specializations also seem to have incorrect display fail_kind.

  3. markshannon
    added a commit that references this issue on Dec 22, 2022

    GH-99770: Make the correct call specialization fail kind show up in t…

    a021612
  4. penguin-wwy
    closed this as completedon Dec 23, 2022
  5. iritkatriel
    added a commit that references this issue on Dec 28, 2022

    Merged main into regmachine branch (#50)

    fdc73cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    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.