ffi: validate fast 32-bit integer argument ranges - #64691
Open
trivikr wants to merge 1 commit into
Open
Conversation
Collaborator
|
Review requested:
|
trivikr
force-pushed
the
ffi-i32-bypass-validation
branch
from
July 23, 2026 06:58
5cfc0ae to
a5ff09c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #64691 +/- ##
==========================================
+ Coverage 90.14% 90.16% +0.02%
==========================================
Files 744 744
Lines 242518 242523 +5
Branches 45685 45714 +29
==========================================
+ Hits 218611 218677 +66
+ Misses 15396 15337 -59
+ Partials 8511 8509 -2
🚀 New features to boost your workflow:
|
avivkeller
approved these changes
Jul 24, 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.
Collaborator
ExE-Boss
reviewed
Jul 26, 2026
ExE-Boss
left a comment
Contributor
There was a problem hiding this comment.
This probably also needs u(int)32:
Add i32, int32, u32, and uint32 to Fast API integer validation so optimized calls reject invalid values instead of allowing V8 to coerce or truncate them. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.6-sol
trivikr
force-pushed
the
ffi-i32-bypass-validation
branch
from
July 27, 2026 01:07
a5ff09c to
004d3fd
Compare
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: #64690
V8’s Fast API converts 32-bit integer arguments to
int32oruint32using coercing and truncating conversions. Fast FFI signatures using
i32,int32,u32, oruint32did not enable the JavaScriptinteger-validation wrapper, so optimized calls could accept invalid
values that the generic FFI path rejects.
Add the signed and unsigned 32-bit type names to the Fast API validation
metadata and native validation-selection check, with regression coverage
for out-of-range and non-integer values.
Assisted-by: openai:gpt-5.6-sol