]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-122759: Remove `assert` from `RERAISE` error handling (#122760)
authorsobolevn <mail@sobolevn.me>
Wed, 7 Aug 2024 14:25:25 +0000 (17:25 +0300)
committerGitHub <noreply@github.com>
Wed, 7 Aug 2024 14:25:25 +0000 (17:25 +0300)
Python/bytecodes.c
Python/generated_cases.c.h

index e4c97dee1f80ea662fad31833003f97866e4d3f4..d28cbd767e787813731b745e3ad3bb5dfca2a323 100644 (file)
@@ -1183,7 +1183,6 @@ dummy_func(
                     assert(!_PyErr_Occurred(tstate));
                 }
                 else {
-                    assert(PyLong_Check(lasti));
                     _PyErr_SetString(tstate, PyExc_SystemError, "lasti is not an int");
                     ERROR_NO_POP();
                 }
index e560372a5f983e3e3709ad885eaf5a16daa3c179..5890fcea8e64d5ea5f36adb57565586bb5837064 100644 (file)
                     assert(!_PyErr_Occurred(tstate));
                 }
                 else {
-                    assert(PyLong_Check(lasti));
                     _PyErr_SetString(tstate, PyExc_SystemError, "lasti is not an int");
                     goto error;
                 }