8000 GH-94739: Mark stacks in exception handlers. by markshannon · Pull Request #94958 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-94739: Mark stacks in exception handlers. #94958

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

Merged
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
Assert exception table entries are in range.
  • Loading branch information
markshannon committed Jul 18, 2022
commit f16729241e49e982c47312a043150e2ba411d421
3 changes: 3 additions & 0 deletions Objects/frameobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,11 @@ mark_stacks(PyCodeObject *code_obj, int len)
while (scan < end) {
int start_offset, size, handler;
scan = parse_varint(scan, &start_offset);
assert(start_offset >= 0 && start_offset < len);
scan = parse_varint(scan, &size);
assert(size >= 0 && start_offset+size <= len);
scan = parse_varint(scan, &handler);
assert(handler >= 0 && handler < len);
int depth_and_lasti;
scan = parse_varint(scan, &depth_and_lasti);
int level = depth_and_lasti >> 1;
Expand Down
0