ffi: reject detached ArrayBufferViews - #65086
Merged
nodejs-github-bot merged 1 commit intoAug 13, 2026
Merged
Conversation
Collaborator
|
Review requested:
|
trivikr
force-pushed
the
ffi-export-arraybufferview-detached-handling
branch
2 times, most recently
from
August 7, 2026 02:59
6a14197 to
ebb66f2
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65086 +/- ##
==========================================
- Coverage 92.06% 90.33% -1.73%
==========================================
Files 399 760 +361
Lines 176328 248541 +72213
Branches 27212 46907 +19695
==========================================
+ Hits 162328 224513 +62185
- Misses 13689 15464 +1775
- Partials 311 8564 +8253
🚀 New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
Detached ArrayBuffers were rejected with ERR_INVALID_ARG_VALUE, but detached views were not: typed arrays exported zero bytes and DataViews threw a bare TypeError from byteLength. Track detachment in ArrayBufferViewContents::Read() and skip the JS length check for detached buffers, so every detached input is rejected. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol
trivikr
force-pushed
the
ffi-export-arraybufferview-detached-handling
branch
from
August 11, 2026 15:25
ebb66f2 to
2b7d621
Compare
ShogunPanda
approved these changes
Aug 12, 2026
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/65086 ✔ Done loading data for nodejs/node/pull/65086 ----------------------------------- PR info ------------------------------------ Title ffi: reject detached ArrayBufferViews (#65086) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch trivikr:ffi-export-arraybufferview-detached-handling -> nodejs:main Labels c++, needs-ci, commit-queue, ffi Commits 1 - ffi: reject detached ArrayBufferViews Committers 1 - Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> PR-URL: https://github.com/nodejs/node/pull/65086 Fixes: https://github.com/nodejs/node/issues/65085 Reviewed-By: Paolo Insogna <paolo@cowtech.it> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/65086 Fixes: https://github.com/nodejs/node/issues/65085 Reviewed-By: Paolo Insogna <paolo@cowtech.it> -------------------------------------------------------------------------------- ℹ This PR was created on Thu, 06 Aug 2026 15:16:59 GMT ✔ Approvals: 1 ✔ - Paolo Insogna (@ShogunPanda) (TSC): https://github.com/nodejs/node/pull/65086#pullrequestreview-4914088434 ✘ This PR needs to wait 24 more hours to land (or 0 minutes if there is one more approval) ✔ Last GitHub CI successful ℹ Last Full PR CI on 2026-08-10T20:56:16Z: https://ci.nodejs.org/job/node-test-pull-request/75752/ ⚠ Commits were pushed after the last Full PR CI run: ⚠ - ffi: reject detached ArrayBufferViews - Querying data for job/node-test-pull-request/75752/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/31614572726 |
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Collaborator
|
Landed in c47ad66 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #65085
Detached ArrayBuffers were rejected with ERR_INVALID_ARG_VALUE, but detached views were not: typed arrays exported zero bytes and DataViews threw a bare TypeError from byteLength.
Track detachment in ArrayBufferViewContents::Read() and skip the JS length check for detached buffers, so every detached input is rejected.
Assisted-by: codex:gpt-5.6-sol