Skip to content

fix(DataArray): validate structural mutations and preserve ranges - #3634

Open
daker wants to merge 1 commit into
Kitware:masterfrom
daker:dataarray-fixes
Open

fix(DataArray): validate structural mutations and preserve ranges#3634
daker wants to merge 1 commit into
Kitware:masterfrom
daker:dataarray-fixes

Conversation

@daker

@daker daker commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Context

Prevent invalid tuple insertions, resize operations, and component counts from corrupting array invariants. Invalidate cached ranges after mutations and preserve independently cloned ranges in newClone() and deepCopy().

Require setData() to receive a typed array.

Fixes #3628

Results

Changes

PR Checklist

  • GitHub Actions CI passed: semantic-release commit messages, lint, and tests
  • Test coverage added
  • Documentation and TypeScript definitions are updated to match these changes

@daker
daker force-pushed the dataarray-fixes branch 2 times, most recently from 479e311 to 514e859 Compare September 5, 2026 14:14
@daker

daker commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

@finetjul

Comment thread Sources/Common/Core/DataArray/test/testDataArray.js Outdated
Comment thread Sources/Common/Core/DataArray/index.d.ts Outdated
Comment thread Sources/Common/Core/DataArray/index.js
Comment thread Sources/Common/Core/DataArray/index.js
Comment thread Sources/Common/Core/DataArray/index.js Outdated
Comment thread Sources/Common/Core/DataArray/index.js
Comment thread Sources/Common/Core/DataArray/index.js Outdated
Comment thread Sources/Common/Core/DataArray/index.js Outdated
Comment thread Sources/Common/Core/DataArray/index.js
Prevent invalid tuple insertions, resize operations, and component counts from
corrupting array invariants. Invalidate cached ranges after mutations and
preserve independently cloned ranges in newClone() and deepCopy().

Require setData() to receive a typed array.

Fixes Kitware#3628
@daker
daker requested a review from finetjul September 8, 2026 07:56
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.

vtkDataArray.getValue reads past array end on non-first-component indices

2 participants