Skip to content

GH-40999: [Java] Fix AIOOBE trying to splitAndTransfer DUV within nullable struct #41000

Merged
lidavidm merged 1 commit intoapache:mainfrom
xtdb:duv-in-struct-transfer
Apr 7, 2024
Merged

GH-40999: [Java] Fix AIOOBE trying to splitAndTransfer DUV within nullable struct #41000
lidavidm merged 1 commit intoapache:mainfrom
xtdb:duv-in-struct-transfer

Conversation

@jarohen
Copy link
Copy Markdown
Contributor

@jarohen jarohen commented Apr 4, 2024

We add a typeId >= 0 guard to DUV.TransferImpl.splitAndTransfer to fix #40999.

Are these changes tested?

Yes

Are there any user-facing changes?

No

@jarohen jarohen requested a review from lidavidm as a code owner April 4, 2024 09:00
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 4, 2024

⚠️ GitHub issue #40999 has been automatically assigned in GitHub to PR creator.

@jarohen jarohen force-pushed the duv-in-struct-transfer branch from 947f8fc to c98e143 Compare April 4, 2024 09:12
@vibhatha
Copy link
Copy Markdown
Contributor

vibhatha commented Apr 6, 2024

@github-actions crossbow submit java

Copy link
Copy Markdown
Contributor

@vibhatha vibhatha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this PR. LGTM!
Running the crossbows...

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Apr 6, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2024

Revision: c98e143

Submitted crossbow builds: ursacomputing/crossbow @ actions-b831aa40e2

Task Status
java-jars GitHub Actions
verify-rc-source-java-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-java-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-java-linux-ubuntu-22.04-amd64 GitHub Actions
verify-rc-source-java-macos-amd64 GitHub Actions

Copy link
Copy Markdown
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. This is still copying garbage around, right? I suppose with most vectors, it just doesn't matter. And we have no way of knowing that this slot is actually undefined here.

@lidavidm lidavidm merged commit 84f6ede into apache:main Apr 7, 2024
@lidavidm lidavidm removed the awaiting committer review Awaiting committer review label Apr 7, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label Apr 7, 2024
@jarohen jarohen deleted the duv-in-struct-transfer branch April 8, 2024 06:09
@jarohen
Copy link
Copy Markdown
Contributor Author

jarohen commented Apr 8, 2024

@lidavidm yep, t'is. I'm not sure you'd want to avoid it, in this case - this way, you get to copy contiguous child buffers. Otherwise, IIUC, to avoid copying garbage you'd have to copy individual entries?

Thanks for merging the PR btw ☺️

@lidavidm
Copy link
Copy Markdown
Member

lidavidm commented Apr 8, 2024

To avoid copying garbage I think you'd have to always zero-initialize with the way we've built these APIs.

@conbench-apache-arrow
Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 84f6ede.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

vibhatha pushed a commit to vibhatha/arrow that referenced this pull request May 25, 2024
…in nullable struct (apache#41000)

We add a `typeId >= 0` guard to `DUV.TransferImpl.splitAndTransfer` to fix apache#40999.

### Are these changes tested?

Yes

### Are there any user-facing changes?

No
* GitHub Issue: apache#40999

Authored-by: James Henderson <james@jarohen.dev>
Signed-off-by: David Li <li.davidm96@gmail.com>
pribor pushed a commit to GlobalWebIndex/arrow that referenced this pull request Oct 24, 2025
…in nullable struct (apache#41000)

We add a `typeId >= 0` guard to `DUV.TransferImpl.splitAndTransfer` to fix apache#40999.

### Are these changes tested?

Yes

### Are there any user-facing changes?

No
* GitHub Issue: apache#40999

Authored-by: James Henderson <james@jarohen.dev>
Signed-off-by: David Li <li.davidm96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Java] AIOOBE trying to splitAndTransfer DUV within nullable struct

3 participants