Skip to content

Validate vector lengths in native addInPlace/subInPlace/minInPlace - #792

Open
r-devulap wants to merge 1 commit into
mainfrom
760-fix
Open

r-devulap wants to merge 1 commit into
mainfrom
760-fix

Conversation

@r-devulap

Copy link
Copy Markdown
Contributor

Fixes #760.

The native paths passed v1.length() to native code without checking v2, so a shorter v2 could cause out-of-bounds native reads. Reject unequal lengths at the Java/native boundary, matching the Panama implementations.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Before you submit for review:

  • Does your PR follow guidelines from CONTRIBUTIONS.md?
  • Did you summarize what this PR does clearly and concisely?
  • Did you include performance data for changes which may be performance impacting?
  • Did you include useful docs for any user-facing changes or features?
  • Did you include useful javadocs for developer oriented changes, explaining new concepts or key changes?
  • Did you rebase your branch onto the latest main for regression testing and PR submission?
  • Did you trigger regression testing via Run Bench Main and review results?
  • Did you adhere to the code formatting guidelines (TBD)
  • Did you group your changes for easy review, providing meaningful descriptions for each commit?
  • Did you ensure that all files contain the correct copyright header?
  • Did you add documentation for this feature to the release notes directory?

If you did not complete any of these, then please explain below.

The native paths passed v1.length() to native code without checking v2,
so a shorter v2 could cause out-of-bounds native reads. Reject unequal
lengths at the Java/native boundary, matching the Panama implementations.
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.

Validate lengths in existing native in-place vector operations

1 participant