Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-117180: Complete call sequence when trace stack overflow #117184

Merged
merged 4 commits into from
Mar 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address Guido's review
Co-Authored-By: Guido van Rossum <[email protected]>
  • Loading branch information
Fidget-Spinner and gvanrossum committed Mar 23, 2024
commit 70e764424b6d5488d9b78de5464a47009b2ce6ea
6 changes: 2 additions & 4 deletions Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,8 @@ BRANCH_TO_GUARD[4][2] = {
if (trace_stack_depth >= TRACE_STACK_SIZE) { \
DPRINTF(2, "Trace stack overflow\n"); \
OPT_STAT_INC(trace_stack_overflow); \
gvanrossum marked this conversation as resolved.
Show resolved Hide resolved
/* Remove the call sequence */ \
for (int x = 0; x < i; x++) { \
trace[trace_length-x].opcode = _NOP; \
} \
ADD_TO_TRACE(uop, oparg, operand, target); \
ADD_TO_TRACE(_EXIT_TRACE, 0, 0, 0); \
goto done; \
} \
assert(func == NULL || func->func_code == (PyObject *)code); \
Expand Down
Loading