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

fix: Improve validation of offset buffers for sliced arrays #626

Merged
merged 13 commits into from
Sep 20, 2024

Conversation

paleolimbot
Copy link
Member

@paleolimbot paleolimbot commented Sep 19, 2024

This PR updates validation of offset buffers in string/binary, large string/binary, list, and large list types such that portions of the buffers not strictly required by the slice referenced by offset and length are not accessed/validated. This came up in the IPC integration tests because C# exports full buffers rather than the portions of buffers strictly required.

This highlights how our test suite would benefit from helpers to reduce repetition (although I'd prefer to handle that at a later time if possible).

src/nanoarrow/common/array.c Outdated Show resolved Hide resolved
@paleolimbot paleolimbot changed the title fix: Only validate portions of offset buffers strictly required fix: Improve validation of offset buffers for sliced arrays Sep 20, 2024
@paleolimbot paleolimbot marked this pull request as ready for review September 20, 2024 05:54
@bkietz bkietz merged commit 5d53738 into apache:main Sep 20, 2024
35 checks passed
paleolimbot added a commit that referenced this pull request Sep 20, 2024
Similar to #626 but for union type_id arrays. This should fix the two
remaining failures in the integration tests between the IPC
implementations in the Arrow repository and the nanoarrow IPC
implementation apache/arrow#43715.
@paleolimbot paleolimbot deleted the ipc-integration-tests-debug branch September 21, 2024 01:55
@paleolimbot paleolimbot added this to the nanoarrow 0.6.0 milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants