File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,7 @@ const uint16_t op_without_decref_inputs[MAX_UOP_ID + 1] = {
461461 [_BINARY_OP_SUBTRACT_FLOAT ] = _BINARY_OP_SUBTRACT_FLOAT__NO_DECREF_INPUTS ,
462462};
463463
464- /* 1 for success, 0 for not ready, cannot error at the moment . */
464+ /* 1 for success, 0 for not ready, clears all possible errors . */
465465static int
466466optimize_uops (
467467 PyCodeObject * co ,
@@ -471,6 +471,7 @@ optimize_uops(
471471 _PyBloomFilter * dependencies
472472)
473473{
474+ assert (!PyErr_Occurred ());
474475
475476 JitOptContext context ;
476477 JitOptContext * ctx = & context ;
@@ -557,6 +558,10 @@ optimize_uops(
557558 OPT_ERROR_IN_OPCODE (opcode );
558559 }
559560 _Py_uop_abstractcontext_fini (ctx );
561+
562+ if (PyErr_Occurred ()) {
563+ PyErr_Clear ();
564+ }
560565 return -1 ;
561566
562567}
You can’t perform that action at this time.
0 commit comments