-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
3.13bugs and security fixesbugs and security fixesbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
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
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixesbuildThe build process and cross-buildThe build process and cross-buildtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error