File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -353,6 +353,9 @@ sys_trace_line_func(
353353 }
354354 assert (PyVectorcall_NARGS (nargsf ) == 2 );
355355 int line = PyLong_AsInt (args [1 ]);
356+ if (line == -1 && PyErr_Occurred ()) {
357+ return NULL ;
358+ }
356359 assert (line >= 0 );
357360 PyFrameObject * frame = PyEval_GetFrame ();
358361 if (frame == NULL ) {
@@ -379,9 +382,17 @@ sys_trace_jump_func(
379382 Py_RETURN_NONE ;
380383 }
381384 assert (PyVectorcall_NARGS (nargsf ) == 3 );
382- int from = PyLong_AsInt (args [1 ])/sizeof (_Py_CODEUNIT );
385+ int from = PyLong_AsInt (args [1 ]);
386+ if (from == -1 && PyErr_Occurred ()) {
387+ return NULL ;
388+ }
389+ from /= sizeof (_Py_CODEUNIT );
383390 assert (from >= 0 );
384- int to = PyLong_AsInt (args [2 ])/sizeof (_Py_CODEUNIT );
391+ int to = PyLong_AsInt (args [2 ]);
392+ if (to == -1 && PyErr_Occurred ()) {
393+ return NULL ;
394+ }
395+ to /= sizeof (_Py_CODEUNIT );
385396 assert (to >= 0 );
386397 if (to > from ) {
387398 /* Forward jump */
You can’t perform that action at this time.
0 commit comments