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 — The `cases_generator` handles some instructions incorrectly · Issue #106250 · python/cpython

The cases_generator handles some instructions incorrectly #106250

New issue
Copy link
New issue
Copy link
Closed
Closed
The cases_generator handles some instructions incorrectly#106250
Copy link
Assignees
gvanrossum
Labels
3.13only security fixesonly security fixesbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@brandtbucher
brandtbucher
opened on Jun 29, 2023
Issue body actions

I triggered this assert...

Traceback (most recent call last):
  File "/home/brandtbucher/cpython/./Tools/cases_generator/generate_cases.py", line 1609, in <module>
    main()
  File "/home/brandtbucher/cpython/./Tools/cases_generator/generate_cases.py", line 1604, in main
    a.write_metadata()
  File "/home/brandtbucher/cpython/./Tools/cases_generator/generate_cases.py", line 1260, in write_metadata
    assert not instr.active_caches, (instr.name, instr.cache_effects)
AssertionError: ('TO_BOOL_ALWAYS_TRUE', [CacheEffect(context=<Python/bytecodes.c: 1807-1810>, name='unused', size=1), CacheEffect(context=<Python/bytecodes.c: 1811-1814>, name='version', size=2)]

...while defining this new instruction...

        inst(TO_BOOL_ALWAYS_TRUE, (unused/1, version/2, value -- res)) {
            // This one is a bit weird, because we expect *some* failures:
            assert(version);
            DEOPT_IF(Py_TYPE(value)->tp_version_tag != version, TO_BOOL);
            STAT_INC(TO_BOOL, hit);
            DECREF_INPUTS();
            res = Py_True;
        }

@gvanrossum thinks that the assert is incorrect: it appears that the current code doesn't know how to handle an instruction that uses caches but doesn't have an oparg.

Linked PRs

  • gh-106250: Support inst() using one cache entry and no oparg #106252

Activity

  1. brandtbucher
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    buildThe build process and cross-buildThe build process and cross-build
    3.13only security fixesonly security fixes
    on Jun 29, 2023
  2. brandtbucher
    assigned
    gvanrossum
    on Jun 29, 2023
  3. brandtbucher
    added a commit that references this issue on Jun 29, 2023

    GH-106250: Support insts using one cache entry and no oparg (GH-106252)

    6e9f83d
  4. brandtbucher
    closed this as completedon Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @gvanrossum
    gvanrossum

Labels

3.13only security fixesonly security fixesbuildThe build process and cross-buildThe build process and cross-buildtype-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.