Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb578a0

Browse files
authored
gh-104584: Fix assert in DEOPT macro -- should fix buildbot (#106131)
1 parent 0762775 commit bb578a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Python/ceval_macros.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,12 @@ GETITEM(PyObject *v, Py_ssize_t i) {
264264
#define UPDATE_MISS_STATS(INSTNAME) ((void)0)
265265
#endif
266266

267+
// NOTE: in the uops version, opcode may be > 255
267268
#define DEOPT_IF(COND, INSTNAME) \
268269
if ((COND)) { \
269270
/* This is only a single jump on release builds! */ \
270271
UPDATE_MISS_STATS((INSTNAME)); \
271-
assert(_PyOpcode_Deopt[opcode] == (INSTNAME)); \
272+
assert(opcode >= 256 || _PyOpcode_Deopt[opcode] == (INSTNAME)); \
272273
GO_TO_INSTRUCTION(INSTNAME); \
273274
}
274275

0 commit comments

Comments
 (0)