Skip to content
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

gh-127411: Fix invalid conversion of load of TLBC array when compiled in C++ #127466

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

mpage
Copy link
Contributor

@mpage mpage commented Dec 1, 2024

@mpage
Copy link
Contributor Author

mpage commented Dec 1, 2024

I was able to reproduce the issue installing scipy and verified that running pip install -U --pre --no-build-isolation git+https://github.com/scipy/scipy in a venv built with this PR succeeds.

@mpage mpage marked this pull request as ready for review December 1, 2024 21:34
Copy link

@clin1234 clin1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A _Py_STATIC_CAST is more suitable, no?

@mpage mpage requested a review from clin1234 December 2, 2024 01:44
static inline _PyCodeArray *
_PyCode_GetTLBCArray(PyCodeObject *co)
{
return _Py_STATIC_CAST(_PyCodeArray *,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about _Py_STATIC_CAST when I mentioned it in the issue, but the precedent is to not use it for objects.

@mpage mpage merged commit c430376 into python:main Dec 2, 2024
43 checks passed
@mpage mpage deleted the gh-127411-add-cast branch December 2, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants