summaryrefslogtreecommitdiffstats
path: root/Python/generated_cases.c.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-06-25 15:42:29 (GMT)
committerGitHub <noreply@github.com>2024-06-25 15:42:29 (GMT)
commit8f5a01707f27a015b52b7b55af058f8833f8f7db (patch)
tree7f29c5e82fbfd85e4b1976fc0288a406256dd1cd /Python/generated_cases.c.h
parent42b2c9d78da7ebd6bd5925a4d4c78aec3c9e78e6 (diff)
downloadcpython-8f5a01707f27a015b52b7b55af058f8833f8f7db.zip
cpython-8f5a01707f27a015b52b7b55af058f8833f8f7db.tar.gz
cpython-8f5a01707f27a015b52b7b55af058f8833f8f7db.tar.bz2
GH-120982: Add stack check assertions to generated interpreter code (GH-120992)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r--Python/generated_cases.c.h142
1 files changed, 142 insertions, 0 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 327a704..2d23b43 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -47,6 +47,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -76,6 +77,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -105,6 +107,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -134,6 +137,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -179,6 +183,7 @@
SKIP_OVER(1);
}
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -208,6 +213,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -237,6 +243,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -266,6 +273,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -295,6 +303,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -323,6 +332,7 @@
if (res == NULL) goto pop_3_error;
stack_pointer[-3] = res;
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -361,6 +371,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -387,6 +398,7 @@
// not found or error
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -448,6 +460,7 @@
Py_DECREF(list);
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -476,6 +489,7 @@
Py_DECREF(str);
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -504,6 +518,7 @@
Py_DECREF(tuple);
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -528,6 +543,7 @@
if (map == NULL) { stack_pointer += -1 - oparg; goto error; }
stack_pointer[-1 - oparg] = map;
stack_pointer += -oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -542,6 +558,7 @@
if (list == NULL) { stack_pointer += -oparg; goto error; }
stack_pointer[-oparg] = list;
stack_pointer += 1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -562,6 +579,7 @@
if (map == NULL) { stack_pointer += -oparg*2; goto error; }
stack_pointer[-oparg*2] = map;
stack_pointer += 1 - oparg*2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -588,6 +606,7 @@
}
stack_pointer[-oparg] = set;
stack_pointer += 1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -609,6 +628,7 @@
if (slice == NULL) { stack_pointer += -2 - ((oparg == 3) ? 1 : 0); goto error; }
stack_pointer[-2 - ((oparg == 3) ? 1 : 0)] = slice;
stack_pointer += -1 - ((oparg == 3) ? 1 : 0);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -626,6 +646,7 @@
if (str == NULL) { stack_pointer += -oparg; goto error; }
stack_pointer[-oparg] = str;
stack_pointer += 1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -640,6 +661,7 @@
if (tup == NULL) { stack_pointer += -oparg; goto error; }
stack_pointer[-oparg] = tup;
stack_pointer += 1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -754,6 +776,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -906,6 +929,7 @@
// Eventually this should be the only occurrence of this code.
assert(tstate->interp->eval_frame == NULL);
stack_pointer += -2 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
_PyFrame_SetStackPointer(frame, stack_pointer);
new_frame->previous = frame;
CALL_STAT_INC(inlined_py_calls);
@@ -979,6 +1003,7 @@
// The frame has stolen all the arguments from the stack,
// so there is no need to clean them up.
stack_pointer += -2 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
if (new_frame == NULL) {
goto error;
}
@@ -1047,6 +1072,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1095,6 +1121,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1142,6 +1169,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1189,6 +1217,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1275,6 +1304,7 @@
if (result == NULL) { stack_pointer += -3 - (oparg & 1); goto error; }
stack_pointer[-3 - (oparg & 1)] = result;
stack_pointer += -2 - (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1310,6 +1340,7 @@
if (res == NULL) goto pop_2_error;
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -1353,6 +1384,7 @@
Py_DECREF(callable);
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -1443,6 +1475,7 @@
if (res == NULL) { stack_pointer += -3 - oparg; goto error; }
stack_pointer[-3 - oparg] = res;
stack_pointer += -2 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1485,6 +1518,7 @@
Py_DECREF(arg);
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -1565,6 +1599,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1615,6 +1650,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1665,6 +1701,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1716,6 +1753,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1766,6 +1804,7 @@
}
stack_pointer[-2 - oparg] = res;
stack_pointer += -1 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1836,6 +1875,7 @@
// Eventually this should be the only occurrence of this code.
assert(tstate->interp->eval_frame == NULL);
stack_pointer += -2 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
_PyFrame_SetStackPointer(frame, stack_pointer);
new_frame->previous = frame;
CALL_STAT_INC(inlined_py_calls);
@@ -1890,6 +1930,7 @@
// The frame has stolen all the arguments from the stack,
// so there is no need to clean them up.
stack_pointer += -2 - oparg;
+ assert(WITHIN_STACK_BOUNDS());
if (new_frame == NULL) {
goto error;
}
@@ -1949,6 +1990,7 @@
}
stack_pointer[-3] = res;
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -1982,6 +2024,7 @@
}
stack_pointer[-3] = res;
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
CHECK_EVAL_BREAKER();
DISPATCH();
}
@@ -2008,6 +2051,7 @@
Py_DECREF(arg);
stack_pointer[-3] = res;
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2094,6 +2138,7 @@
stack_pointer[-3] = none;
stack_pointer[-2] = value;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2139,6 +2184,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2172,6 +2218,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2209,6 +2256,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2243,6 +2291,7 @@
}
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2282,6 +2331,7 @@
}
stack_pointer[-2] = b;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2305,6 +2355,7 @@
b = (res ^ oparg) ? Py_True : Py_False;
stack_pointer[-2] = b;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2329,6 +2380,7 @@
b = (res ^ oparg) ? Py_True : Py_False;
stack_pointer[-2] = b;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2360,6 +2412,7 @@
top = Py_NewRef(bottom);
stack_pointer[0] = top;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2391,6 +2444,7 @@
Py_DECREF(owner);
if (err) goto pop_1_error;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2481,6 +2535,7 @@
Py_DECREF(sub);
if (err) goto pop_2_error;
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2501,6 +2556,7 @@
}
Py_DECREF(update);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2523,6 +2579,7 @@
}
Py_DECREF(update);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2547,6 +2604,7 @@
goto exception_unwind;
}
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2558,6 +2616,7 @@
value = stack_pointer[-1];
Py_DECREF(value);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2572,6 +2631,7 @@
Py_DECREF(receiver);
stack_pointer[-2] = value;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2622,6 +2682,7 @@
goto error;
}
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2672,6 +2733,7 @@
if (res == NULL) goto pop_2_error;
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2724,6 +2786,7 @@
}
stack_pointer[0] = next;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2818,6 +2881,7 @@
}
stack_pointer[0] = next;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2861,6 +2925,7 @@
}
stack_pointer[0] = next;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2906,6 +2971,7 @@
}
stack_pointer[0] = next;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -2992,6 +3058,7 @@
}
stack_pointer[0] = awaitable;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3054,6 +3121,7 @@
if (len_o == NULL) goto error;
stack_pointer[0] = len_o;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3104,6 +3172,7 @@
if (res == NULL) goto error;
stack_pointer[0] = res;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3123,6 +3192,7 @@
if (res == NULL) goto pop_2_error;
stack_pointer[-2] = res;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3187,6 +3257,7 @@
}
Py_DECREF(value);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3207,6 +3278,7 @@
Py_DECREF(receiver);
stack_pointer[-2] = value;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3513,6 +3585,7 @@
b = res ? Py_True : Py_False;
stack_pointer[-2] = b;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3586,6 +3659,7 @@
list = stack_pointer[-2 - (oparg-1)];
if (_PyList_AppendTakeRef((PyListObject *)list, v) < 0) goto pop_1_error;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3613,6 +3687,7 @@
assert(Py_IsNone(none_val));
Py_DECREF(iterable);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3679,6 +3754,7 @@
stack_pointer[-1] = attr;
if (oparg & 1) stack_pointer[0] = self_or_null;
stack_pointer += (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3712,6 +3788,7 @@
stack_pointer[-1] = attr;
if (oparg & 1) stack_pointer[0] = null;
stack_pointer += (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3787,6 +3864,7 @@
stack_pointer[-1] = attr;
if (oparg & 1) stack_pointer[0] = null;
stack_pointer += (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3829,6 +3907,7 @@
stack_pointer[-1] = attr;
stack_pointer[0] = self;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3864,6 +3943,7 @@
stack_pointer[-1] = attr;
stack_pointer[0] = self;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3910,6 +3990,7 @@
stack_pointer[-1] = attr;
stack_pointer[0] = self;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -3949,6 +4030,7 @@
stack_pointer[-1] = attr;
if (oparg & 1) stack_pointer[0] = null;
stack_pointer += (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4089,6 +4171,7 @@
stack_pointer[-1] = attr;
if (oparg & 1) stack_pointer[0] = null;
stack_pointer += (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4142,6 +4225,7 @@
stack_pointer[-1] = attr;
if (oparg & 1) stack_pointer[0] = null;
stack_pointer += (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4158,6 +4242,7 @@
}
stack_pointer[0] = bc;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4179,6 +4264,7 @@
}
stack_pointer[0] = value;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4191,6 +4277,7 @@
Py_INCREF(value);
stack_pointer[0] = value;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4207,6 +4294,7 @@
}
stack_pointer[0] = value;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4220,6 +4308,7 @@
Py_INCREF(value);
stack_pointer[0] = value;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4233,6 +4322,7 @@
GETLOCAL(oparg) = NULL;
stack_pointer[0] = value;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4252,6 +4342,7 @@
Py_INCREF(value);
stack_pointer[0] = value;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4270,6 +4361,7 @@
stack_pointer[0] = value1;
stack_pointer[1] = value2;
stack_pointer += 2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4415,6 +4507,7 @@
stack_pointer[0] = res;
if (oparg & 1) stack_pointer[1] = null;
stack_pointer += 1 + (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4456,6 +4549,7 @@
stack_pointer[0] = res;
if (oparg & 1) stack_pointer[1] = null;
stack_pointer += 1 + (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4490,6 +4584,7 @@
stack_pointer[0] = res;
if (oparg & 1) stack_pointer[1] = null;
stack_pointer += 1 + (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4507,6 +4602,7 @@
Py_INCREF(locals);
stack_pointer[0] = locals;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4543,6 +4639,7 @@
}
stack_pointer[0] = v;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4568,6 +4665,7 @@
stack_pointer[-1] = attr;
stack_pointer[0] = self_or_null;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4643,6 +4741,7 @@
stack_pointer[-3] = attr;
if (oparg & 1) stack_pointer[-2] = null;
stack_pointer += -2 + (oparg & 1);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4671,6 +4770,7 @@
if (attr == NULL) goto pop_3_error;
stack_pointer[-3] = attr;
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4712,6 +4812,7 @@
stack_pointer[-3] = attr;
stack_pointer[-2] = self_or_null;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4765,6 +4866,7 @@
// Do not DECREF INPUTS because the function steals the references
if (_PyDict_SetItem_Take2((PyDictObject *)dict, key, value) != 0) goto pop_2_error;
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4796,6 +4898,7 @@
}
stack_pointer[-3] = attrs;
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4813,6 +4916,7 @@
if (values_or_none == NULL) goto error;
stack_pointer[0] = values_or_none;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4827,6 +4931,7 @@
res = match ? Py_True : Py_False;
stack_pointer[0] = res;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4841,6 +4946,7 @@
res = match ? Py_True : Py_False;
stack_pointer[0] = res;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4860,6 +4966,7 @@
_PyErr_StackItem *exc_info = tstate->exc_info;
Py_XSETREF(exc_info->exc_value, exc_value == Py_None ? NULL : exc_value);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4878,6 +4985,7 @@
#endif
JUMPBY(oparg * flag);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4912,6 +5020,7 @@
JUMPBY(oparg * flag);
}
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4946,6 +5055,7 @@
JUMPBY(oparg * flag);
}
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4964,6 +5074,7 @@
#endif
JUMPBY(oparg * flag);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4975,6 +5086,7 @@
value = stack_pointer[-1];
Py_DECREF(value);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -4997,6 +5109,7 @@
stack_pointer[-1] = prev_exc;
stack_pointer[0] = new_exc;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5008,6 +5121,7 @@
res = NULL;
stack_pointer[0] = res;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5164,6 +5278,7 @@
}
stack_pointer[0] = res;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5196,6 +5311,7 @@
LLTRACE_RESUME_FRAME();
stack_pointer[0] = res;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5210,6 +5326,7 @@
assert(frame != &entry_frame);
#endif
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
_PyFrame_SetStackPointer(frame, stack_pointer);
assert(EMPTY());
_Py_LeaveRecursiveCallPy(tstate);
@@ -5223,6 +5340,7 @@
LLTRACE_RESUME_FRAME();
stack_pointer[0] = res;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5360,6 +5478,7 @@
Py_DECREF(v);
if (err) goto pop_1_error;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5402,6 +5521,7 @@
}
stack_pointer[-2] = func;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5417,6 +5537,7 @@
Py_DECREF(iterable);
if (err < 0) goto pop_1_error;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5456,6 +5577,7 @@
if (err) goto pop_2_error;
}
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5500,6 +5622,7 @@
Py_DECREF(owner);
}
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5531,6 +5654,7 @@
Py_DECREF(owner);
}
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5589,6 +5713,7 @@
Py_DECREF(owner);
}
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5601,6 +5726,7 @@
PyCellObject *cell = (PyCellObject *)GETLOCAL(oparg);
PyCell_SetTakeRef(cell, v);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5612,6 +5738,7 @@
value = stack_pointer[-1];
SETLOCAL(oparg, value);
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5644,6 +5771,7 @@
SETLOCAL(oparg1, value1);
SETLOCAL(oparg2, value2);
stack_pointer += -2;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5658,6 +5786,7 @@
Py_DECREF(v);
if (err) goto pop_1_error;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5683,6 +5812,7 @@
Py_DECREF(v);
if (err) goto pop_1_error;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5711,6 +5841,7 @@
Py_DECREF(container);
if (err) goto pop_4_error;
stack_pointer += -4;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5751,6 +5882,7 @@
if (err) goto pop_3_error;
}
stack_pointer += -3;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5772,6 +5904,7 @@
Py_DECREF(dict);
if (err) goto pop_3_error;
stack_pointer += -3;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -5802,6 +5935,7 @@
_Py_DECREF_SPECIALIZED(sub, (destructor)PyObject_Free);
Py_DECREF(list);
stack_pointer += -3;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -6034,6 +6168,7 @@
Py_DECREF(seq);
if (res == 0) goto pop_1_error;
stack_pointer += (oparg >> 8) + (oparg & 0xFF);
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -6070,6 +6205,7 @@
if (res == 0) goto pop_1_error;
}
stack_pointer += -1 + oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -6092,6 +6228,7 @@
}
Py_DECREF(seq);
stack_pointer += -1 + oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -6114,6 +6251,7 @@
}
Py_DECREF(seq);
stack_pointer += -1 + oparg;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -6137,6 +6275,7 @@
stack_pointer[-1] = val1;
stack_pointer[0] = val0;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -6181,6 +6320,7 @@
if (res == NULL) goto error;
stack_pointer[0] = res;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
@@ -6203,6 +6343,7 @@
assert(oparg == 0 || oparg == 1);
gen->gi_frame_state = FRAME_SUSPENDED + oparg;
stack_pointer += -1;
+ assert(WITHIN_STACK_BOUNDS());
_PyFrame_SetStackPointer(frame, stack_pointer);
tstate->exc_info = gen->gi_exc_state.previous_item;
gen->gi_exc_state.previous_item = NULL;
@@ -6226,6 +6367,7 @@
LLTRACE_RESUME_FRAME();
stack_pointer[0] = value;
stack_pointer += 1;
+ assert(WITHIN_STACK_BOUNDS());
DISPATCH();
}
#undef TIER_ONE