Skip to content

ffi: reject direct SharedArrayBuffer pointers - #65233

Open
trivikr wants to merge 2 commits into
nodejs:mainfrom
trivikr:ffi-sab-pointer-arg
Open

ffi: reject direct SharedArrayBuffer pointers#65233
trivikr wants to merge 2 commits into
nodejs:mainfrom
trivikr:ffi-sab-pointer-arg

Conversation

@trivikr

@trivikr trivikr commented Aug 12, 2026

Copy link
Copy Markdown
Member

Fixes: #65232

Reject direct SharedArrayBuffer pointer arguments in the JavaScript wrapper and native fast-buffer helper. This keeps validation behavior consistent before and after optimization.


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++. ffi Issues and PRs related to experimental Foreign Function Interface support. needs-ci PRs that need a full CI run. labels Aug 12, 2026
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.33%. Comparing base (e1cdcec) to head (2bc35e2).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65233      +/-   ##
==========================================
+ Coverage   90.31%   90.33%   +0.02%     
==========================================
  Files         751      751              
  Lines      249840   249837       -3     
  Branches    47180    47180              
==========================================
+ Hits       225645   225697      +52     
+ Misses      15587    15522      -65     
- Partials     8608     8618      +10     
Files with missing lines Coverage Δ
lib/internal/ffi/fast-api.js 93.76% <100.00%> (-0.02%) ⬇️
src/ffi/fast.cc 67.87% <ø> (+3.74%) ⬆️

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trivikr trivikr added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 12, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 12, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@trivikr
trivikr marked this pull request as draft August 12, 2026 17:19
@trivikr

This comment was marked as outdated.

Reject direct SharedArrayBuffer pointer arguments in the JavaScript
wrapper and native fast-buffer helper. This keeps validation behavior
consistent before and after optimization.

Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: codex:gpt-5.6-sol
@trivikr
trivikr force-pushed the ffi-sab-pointer-arg branch from fd31a82 to 2bc35e2 Compare August 13, 2026 23:43
@trivikr
trivikr marked this pull request as ready for review August 13, 2026 23:44
@nodejs-github-bot

This comment was marked as resolved.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ffi: SharedArrayBuffer pointer argument changes from rejected to accepted after optimization

3 participants