Skip to content

Commit 5261ecc

Browse files
fix: make assertion tier 2 frame aware (python#37)
1 parent e274c28 commit 5261ecc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/ceval_macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ GETITEM(PyObject *v, Py_ssize_t i) {
142142
/* The integer overflow is checked by an assertion below. */
143143
// TODO change this calculation when interpreter is bb aware.
144144
#define INSTR_OFFSET() ((int)(next_instr - \
145-
(frame->f_code->_tier2_info == NULL ? _PyCode_CODE(frame->f_code) : frame->f_code->_tier2_info->_bb_space->u_code)))
145+
(frame->is_tier2 && frame->f_code->_tier2_info != NULL ? frame->f_code->_tier2_info->_bb_space->u_code : _PyCode_CODE(frame->f_code))))
146146
#define NEXTOPARG() do { \
147147
_Py_CODEUNIT word = *next_instr; \
148148
opcode = word.op.code; \

0 commit comments

Comments
 (0)