File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1+ Fix an issue where frame object manipulations could corrupt inline bytecode
2+ caches.
Original file line number Diff line number Diff line change @@ -603,7 +603,8 @@ add_load_fast_null_checks(PyCodeObject *co)
603603 int changed = 0 ;
604604 _Py_CODEUNIT * instructions = _PyCode_CODE (co );
605605 for (Py_ssize_t i = 0 ; i < Py_SIZE (co ); i ++ ) {
606- switch (_Py_OPCODE (instructions [i ])) {
606+ int opcode = _Py_OPCODE (instructions [i ]);
607+ switch (opcode ) {
607608 case LOAD_FAST :
608609 case LOAD_FAST__LOAD_FAST :
609610 case LOAD_FAST__LOAD_CONST :
@@ -619,6 +620,7 @@ add_load_fast_null_checks(PyCodeObject *co)
619620 _Py_SET_OPCODE (instructions [i ], STORE_FAST );
620621 break ;
621622 }
623+ i += _PyOpcode_Caches [_PyOpcode_Deopt [opcode ]];
622624 }
623625 if (changed ) {
624626 // invalidate cached co_code object
You can’t perform that action at this time.
0 commit comments