We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e5d096 commit 267ecf7Copy full SHA for 267ecf7
1 file changed
Python/optimizer_analysis.c
@@ -461,7 +461,7 @@ const uint16_t op_without_decref_inputs[MAX_UOP_ID + 1] = {
461
[_BINARY_OP_SUBTRACT_FLOAT] = _BINARY_OP_SUBTRACT_FLOAT__NO_DECREF_INPUTS,
462
};
463
464
-/* 1 for success, 0 for not ready, cannot error at the moment. */
+/* 1 for success, 0 for not ready, clears all possible errors. */
465
static int
466
optimize_uops(
467
PyCodeObject *co,
@@ -471,6 +471,7 @@ optimize_uops(
471
_PyBloomFilter *dependencies
472
)
473
{
474
+ assert(!PyErr_Occurred());
475
476
JitOptContext context;
477
JitOptContext *ctx = &context;
@@ -557,6 +558,10 @@ optimize_uops(
557
558
OPT_ERROR_IN_OPCODE(opcode);
559
}
560
_Py_uop_abstractcontext_fini(ctx);
561
+
562
+ if (PyErr_Occurred()) {
563
+ PyErr_Clear();
564
+ }
565
return -1;
566
567
0 commit comments