Skip to content

gh-111178: fix UBSan failures for Python/legacy_tracing.c #131611

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 7 commits into from
Mar 24, 2025
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
renaming
  • Loading branch information
picnixz committed Mar 23, 2025
commit 951f70c9742c7c2fd5ec337b48f7ba60fbc55bcb
20 changes: 10 additions & 10 deletions Python/legacy_tracing.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,57 +58,57 @@

static PyObject *
sys_profile_start(
PyObject *op, PyObject *const *args,
PyObject *callable, PyObject *const *args,
size_t nargsf, PyObject *kwnames
) {
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(op);
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(callable);
assert(kwnames == NULL);
assert(PyVectorcall_NARGS(nargsf) == 2);
return call_profile_func(self, Py_None);
}

static PyObject *
sys_profile_throw(
PyObject *op, PyObject *const *args,
PyObject *callable, PyObject *const *args,
size_t nargsf, PyObject *kwnames
) {
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(op);
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(callable);
assert(kwnames == NULL);
assert(PyVectorcall_NARGS(nargsf) == 3);
return call_profile_func(self, Py_None);
}

static PyObject *
sys_profile_return(
PyObject *op, PyObject *const *args,
PyObject *callable, PyObject *const *args,
size_t nargsf, PyObject *kwnames
) {
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(op);
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(callable);
assert(kwnames == NULL);
assert(PyVectorcall_NARGS(nargsf) == 3);
return call_profile_func(self, args[2]);
}

static PyObject *
sys_profile_unwind(
PyObject *op, PyObject *const *args,
PyObject *callable, PyObject *const *args,
size_t nargsf, PyObject *kwnames
) {
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(op);
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(callable);
assert(kwnames == NULL);
assert(PyVectorcall_NARGS(nargsf) == 3);
return call_profile_func(self, NULL);
}

static PyObject *
sys_profile_call_or_return(
PyObject *op, PyObject *const *args,
PyObject *callable, PyObject *const *args,
size_t nargsf, PyObject *kwnames
) {
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(op);
_PyLegacyEventHandler *self = _PyLegacyEventHandler_CAST(callable);
assert(kwnames == NULL);
assert(PyVectorcall_NARGS(nargsf) == 4);
PyObject *callable = args[2];

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

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

‘callable’ redeclared as different kind of symbol

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

GitHub Actions / Hypothesis tests on Ubuntu

‘callable’ redeclared as different kind of symbol

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

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

‘callable’ redeclared as different kind of symbol

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / build and test (x64)

redefinition of formal parameter 'callable' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

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

‘callable’ redeclared as different kind of symbol

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

GitHub Actions / Cross build Linux

‘callable’ redeclared as different kind of symbol

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

GitHub Actions / Windows / build (arm64)

redefinition of formal parameter 'callable' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

GitHub Actions / Windows / build and test (x64)

redefinition of formal parameter 'callable' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

GitHub Actions / Windows (free-threading) / build (arm64)

redefinition of formal parameter 'callable' [D:\a\cpython\cpython\PCbuild\_freeze_module.vcxproj]

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

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

‘callable’ redeclared as different kind of symbol

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

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

‘callable’ redeclared as different kind of symbol

Check failure on line 111 in Python/legacy_tracing.c

View workflow job for this annotation

GitHub Actions / Address sanitizer (ubuntu-24.04)

‘callable’ redeclared as different kind of symbol
if (PyCFunction_Check(callable)) {
return call_profile_func(self, callable);
}
Expand Down
Loading