Skip to content

ffi: reject detached ArrayBuffers as pointers - #65083

Open
trivikr wants to merge 3 commits into
nodejs:mainfrom
trivikr:ffi-detached-arraybuffers-null
Open

ffi: reject detached ArrayBuffers as pointers#65083
trivikr wants to merge 3 commits into
nodejs:mainfrom
trivikr:ffi-detached-arraybuffers-null

Conversation

@trivikr

@trivikr trivikr commented Aug 6, 2026

Copy link
Copy Markdown
Member

Fixes: #65082

Reject detached ArrayBuffers and ArrayBuffer views in getRawPointer() and FFI pointer argument conversion. This prevents detached backing stores from being silently passed to native functions as null pointers.


Assisted-by: codex:gpt-5.6-sol

Reject detached ArrayBuffers and ArrayBuffer views in getRawPointer()
and FFI pointer argument conversion. This prevents detached backing
stores from being silently passed to native functions as null pointers.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Aug 6, 2026
@trivikr trivikr added ffi Issues and PRs related to experimental Foreign Function Interface support. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 6, 2026
trivikr added 2 commits August 6, 2026 08:19
Report that the ArrayBuffer is detached instead of describing its
backing store as invalid.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
@trivikr
trivikr force-pushed the ffi-detached-arraybuffers-null branch from 2a099ed to 3713f90 Compare August 6, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. ffi Issues and PRs related to experimental Foreign Function Interface support. needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ffi: Detached ArrayBuffers and views are silently converted to null FFI pointers

2 participants