Skip to content
Open
Changes from all commits
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
15 changes: 13 additions & 2 deletions Python/legacy_tracing.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ sys_trace_line_func(
}
assert(PyVectorcall_NARGS(nargsf) == 2);
int line = PyLong_AsInt(args[1]);
if (line == -1 && PyErr_Occurred()) {
return NULL;
}
assert(line >= 0);
PyFrameObject *frame = PyEval_GetFrame();
if (frame == NULL) {
Expand All @@ -379,9 +382,17 @@ sys_trace_jump_func(
Py_RETURN_NONE;
}
assert(PyVectorcall_NARGS(nargsf) == 3);
int from = PyLong_AsInt(args[1])/sizeof(_Py_CODEUNIT);
int from = PyLong_AsInt(args[1]);
if (from == -1 && PyErr_Occurred()) {
return NULL;
}
from /= sizeof(_Py_CODEUNIT);
assert(from >= 0);
int to = PyLong_AsInt(args[2])/sizeof(_Py_CODEUNIT);
int to = PyLong_AsInt(args[2]);
if (to == -1 && PyErr_Occurred()) {
return NULL;
}
to /= sizeof(_Py_CODEUNIT);
assert(to >= 0);
if (to > from) {
/* Forward jump */
Expand Down
Loading