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
possible unitialized values in PyTupleObject #146
Comments
@mattip have you identified a fix for this, this is indeed crashing on pypy in conda-forge/cytoolz-feedstock#32 |
One solution would be to assign |
ill have to check this works later |
I'm sorry, i'm a real noob. But where do you import Py_None from? |
Thanks. i managed to find 1 of the locations and that seemed to fix at least some tests. I still need to find the other. |
I may have been mistaken in claiming there is another. Is there still an error when testing with PyPy? |
Unfortunately so. At this point, it really is an intellectual exercise (like forgetting to initialize a variable), rather than hoping for the best user experience with pypy + toolz (as it is likely to let pypy do its magic rather than use cytoolz). |
By doing
I found two more:
|
Fixed in #149 . I really do appreciate the care and effort y'all put into this. Is there anything else to be done? Would you like me to do a release? |
The code in sliding_window in itertoolz.pyx and here too can create a
PyTupleObject
with uninitialized items. I added someprint(n)
to the code, and the test_sliding_window code did not assign toself.prev[0]
. If my guess is correct, this will cause PyPy to crash. All values must be assigned in creating aPyTupleObject
. CPython will not check this, and will crash later if you ever access an uninitialized item, PyPy checks it and crashes earlier.The text was updated successfully, but these errors were encountered: