]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-104584: Fix assert in DEOPT macro -- should fix buildbot (#106131)
authorGuido van Rossum <guido@python.org>
Tue, 27 Jun 2023 14:02:51 +0000 (07:02 -0700)
committerGitHub <noreply@github.com>
Tue, 27 Jun 2023 14:02:51 +0000 (07:02 -0700)
Python/ceval_macros.h

index 0d41ef5a14cef46416949155b944c167b52e81f7..f5c78fc65e17454abb55b2b36244c3e0fcac53f5 100644 (file)
@@ -264,11 +264,12 @@ GETITEM(PyObject *v, Py_ssize_t i) {
 #define UPDATE_MISS_STATS(INSTNAME) ((void)0)
 #endif
 
+// NOTE: in the uops version, opcode may be > 255
 #define DEOPT_IF(COND, INSTNAME)                            \
     if ((COND)) {                                           \
         /* This is only a single jump on release builds! */ \
         UPDATE_MISS_STATS((INSTNAME));                      \
-        assert(_PyOpcode_Deopt[opcode] == (INSTNAME));      \
+        assert(opcode >= 256 || _PyOpcode_Deopt[opcode] == (INSTNAME)); \
         GO_TO_INSTRUCTION(INSTNAME);                        \
     }