Skip to content
5 changes: 3 additions & 2 deletions Python/instrumentation.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,8 +1235,9 @@
assert(event == PY_MONITORING_EVENT_JUMP ||
event == PY_MONITORING_EVENT_BRANCH_RIGHT ||
event == PY_MONITORING_EVENT_BRANCH_LEFT);
int to = (int)(dest - _PyFrame_GetBytecode(frame));
PyObject *to_obj = PyLong_FromLong(to * (int)sizeof(_Py_CODEUNIT));
Py_ssize_t to = (dest - _PyFrame_GetBytecode(frame));
assert(to <= PY_SSIZE_T_MAX / sizeof(_Py_CODEUNIT));

Check warning on line 1239 in Python/instrumentation.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]

Check warning on line 1239 in Python/instrumentation.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04-arm)

comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]

Check warning on line 1239 in Python/instrumentation.c

View workflow job for this annotation

GitHub Actions / Ubuntu / build and test (ubuntu-24.04)

comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]

Check warning on line 1239 in Python/instrumentation.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04)

comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]

Check warning on line 1239 in Python/instrumentation.c

View workflow job for this annotation

GitHub Actions / Ubuntu (free-threading) / build and test (ubuntu-24.04-arm)

comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]

Check warning on line 1239 in Python/instrumentation.c

View workflow job for this annotation

GitHub Actions / Ubuntu (bolt) / build and test (ubuntu-24.04)

comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
PyObject *to_obj = PyLong_FromSsize_t(to * sizeof(_Py_CODEUNIT));
if (to_obj == NULL) {
return NULL;
}
Expand Down
Loading