-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
gh-127411: Fix invalid conversion of load of TLBC array when compiled in C++ #127466
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
Conversation
|
I was able to reproduce the issue installing scipy and verified that running |
There was a problem hiding this 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?
| static inline _PyCodeArray * | ||
| _PyCode_GetTLBCArray(PyCodeObject *co) | ||
| { | ||
| return _Py_STATIC_CAST(_PyCodeArray *, |
There was a problem hiding this comment.
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.
…mpiled in C++ (python#127466) Cast the result of the load to the correct type
…mpiled in C++ (python#127466) Cast the result of the load to the correct type
Cast the load of the thread-local bytecode array.