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
Memory errors in array.array #51312
Comments
While I was backporting the new buffer API to 2.7 I noticed some issues
While 1) might go unnoticed, 2) definitely broke slice tests in a |
The array type also defines tp_as_mapping->mp_ass_subscript, which has |
The mp_ass_subscript function looks fine in contrast to array_ass_slice(). Still I think it's bad to keep buggy code around, even it is not used. |
Stefan, IIRC you reworked some of the buffer/memoryview code. Do you know if what is reported here is still an issue, and if so if it is worth fixing? |
I think msg93598 sums it up: array_ass_slice() is only called with However, it's pretty dirty to leave the code as is (IIRC Coverity |
I attached a patch, in which I removed v and all code having to do with inserting elements. In particular, I changed the value of b to being positive, since there is no distinction between increasing and decreasing size anymore. |
I've tested the reworked patch on Windows 7, ran 718 tests with 1 skipped both before and after applying the patch. |
The patch looks good to me (assuming it still applies). Should also remove the “b” macro. |
New changeset ab28676df655 by Martin Panter in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: