{{ message }}
Repository navigation
Commit 4896eb3
committed
ffi: validate pointer ranges in optimized calls
On x64 SysV and arm64, a Fast API signature with two or more
arguments that uses only pointer and float types got no JS wrapper.
V8 then truncated pointer BigInts silently. With `-1n` or
`2n ** 64n + 5n`, cold calls threw ERR_INVALID_ARG_VALUE, while
optimized calls passed 0xffffffffffffffff or 5 to native code.
Use the argument wrapper for any signature with a pointer argument.
Signed-off-by: Trivikram Kamat <16024985+trivikr@users.noreply.github.com>
Assisted-by: claude:opus-5.51 parent 75e4bbe commit 4896eb3
2 files changed
Lines changed: 12 additions & 1 deletion

0 commit comments