8000 stack_effect() for specialized opcode is an error · python/cpython@bd19d79 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd19d79

Browse files
committed
stack_effect() for specialized opcode is an error
1 parent 977e639 commit bd19d79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/compile.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,10 @@ static int
10751075
stack_effect(int opcode, int oparg, int jump)
10761076
{
10771077
if (0 <= opcode && opcode < 256) {
1078+
if (_PyOpcode_Deopt[opcode] != opcode) {
1079+
// Specialized instructions are not supported.
1080+
return PY_INVALID_STACK_EFFECT;
1081+
}
10781082
int popped, pushed;
10791083
if (jump > 0) {
10801084
popped = _PyOpcode_num_popped(opcode, oparg, true);

0 commit comments

Comments
 (0)
0