Skip to content

Commit 2234e0a

Browse files
committed
[3.12] pythongh-109889: comment out assertion indicating a failed optimization of a redundant NOP
1 parent 538f505 commit 2234e0a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Python/flowgraph.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,11 @@ optimize_cfg(cfg_builder *g, PyObject *consts, PyObject *const_cache)
15951595
remove_redundant_nops(b);
15961596
}
15971597
eliminate_empty_basic_blocks(g);
1598-
assert(no_redundant_nops(g));
1598+
/* This assertion fails in an edge case (See gh-109889).
1599+
* Remove it for the release (it's just one more NOP in the
1600+
* bytecode for unlikely code).
1601+
*/
1602+
// assert(no_redundant_nops(g));
15991603
RETURN_IF_ERROR(remove_redundant_jumps(g));
16001604
return SUCCESS;
16011605
}

0 commit comments

Comments
 (0)