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
Fix issue 4520 due to storage model mismatch #4623
Conversation
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.
Looks good, thanks for the patch.
@sklam this is dark. Can you give us a |
@esc, yes, i'll try to explain this. Background Numba has this concept called datamodel (which I decided to call in storage model in the PR title because it is probably more descriptive). The datamodels describe how a type is represented in different situations:
Most types have the same value and data representation but a bool is stored as a single bit in the value representation and a single byte in the data representation. The reason being that LLVM uses a Related code: https://github.com/numba/numba/blob/master/numba/datamodel/models.py The bug This patch fixed the incref/decref wrapper function for the containers which is taking a pointer to the container elements using the data representation, but the underlying incref/decref operations are expecting the value representation. Elements in containers must be stored in the data representation because it needs to be addressable. To convert the data representation to value representation, the patch used the |
because str not supported on py2
as titled.