ffi: fix optimized buffer conversions - #64639
Merged
Merged
Conversation
Collaborator
|
Review requested:
|
ShogunPanda
approved these changes
Jul 21, 2026
This comment was marked as outdated.
This comment was marked as outdated.
Codecov Reportβ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64639 +/- ##
==========================================
- Coverage 90.14% 90.14% -0.01%
==========================================
Files 746 746
Lines 242764 242741 -23
Branches 45739 45735 -4
==========================================
- Hits 218848 218819 -29
+ Misses 15426 15422 -4
- Partials 8490 8500 +10
π New features to boost your workflow:
|
This comment was marked as outdated.
This comment was marked as outdated.
trivikr
force-pushed
the
ffi-buffer-sig-bigint
branch
2 times, most recently
from
July 23, 2026 15:47
139053a to
d4a75ce
Compare
This comment was marked as outdated.
This comment was marked as outdated.
trivikr
force-pushed
the
ffi-buffer-sig-bigint
branch
from
July 27, 2026 01:11
d4a75ce to
c2e566c
Compare
avivkeller
approved these changes
Jul 27, 2026
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
trivikr
marked this pull request as draft
July 27, 2026 18:46
Member
Author
|
This PR will be rebased and made ready for review after the fix in ppc64 lands in #64792 |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Preserve pointer-like argument conversions for buffer and arraybuffer signatures after Fast API optimization. Keep memory-backed arguments on the specialized native fast path. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.6-sol
trivikr
force-pushed
the
ffi-buffer-sig-bigint
branch
from
July 30, 2026 02:52
700494d to
9e1a804
Compare
trivikr
marked this pull request as ready for review
July 30, 2026 02:53
Member
Author
|
@ShogunPanda @avivkeller Can one of you please provide your approval again? |
Collaborator
ShogunPanda
approved these changes
Jul 30, 2026
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/64639 β Done loading data for nodejs/node/pull/64639 ----------------------------------- PR info ------------------------------------ Title ffi: fix optimized buffer conversions (#64639) β Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch trivikr:ffi-buffer-sig-bigint -> nodejs:main Labels c++, lib / src, needs-ci, ffi Commits 1 - ffi: fix optimized buffer conversions Committers 1 - Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> PR-URL: https://github.com/nodejs/node/pull/64639 Fixes: https://github.com/nodejs/node/issues/64638 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Aviv Keller <me@aviv.sh> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64639 Fixes: https://github.com/nodejs/node/issues/64638 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Aviv Keller <me@aviv.sh> -------------------------------------------------------------------------------- βΉ This PR was created on Tue, 21 Jul 2026 03:43:06 GMT β Approvals: 2 β - Paolo Insogna (@ShogunPanda) (TSC): https://github.com/nodejs/node/pull/64639#pullrequestreview-4819398365 β - Aviv Keller (@avivkeller): https://github.com/nodejs/node/pull/64639#pullrequestreview-4783382497 β 2 GitHub CI job(s) cancelled: β - lint-readme: CANCELLED (https://github.com/nodejs/node/actions/runs/30509655206/job/90766758617) β - lint-pr-url: CANCELLED (https://github.com/nodejs/node/actions/runs/30509655206/job/90766758661) βΉ Last Full PR CI on 2026-07-30T04:42:36Z: https://ci.nodejs.org/job/node-test-pull-request/75302/ - Querying data for job/node-test-pull-request/75302/ β 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/30567472928 |
Collaborator
|
Landed in f85fdab |
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: #64638
Fast FFI calls with
bufferorarraybufferargument signatures accepted pointer-like values through the generic path, but rejected non-memory-backed values after optimization.This change keeps the primary optimized entry point compatible with raw pointer conversions while retaining the specialized native fast path for memory-backed arguments. Optimized calls now consistently accept documented representations including
bigint, strings, nullish values, buffers, typed arrays, andArrayBufferobjects.Assisted-by: openai:gpt-5.6-sol