Uh oh!
There was an error while loading. Please reload this page.
ffi: keep FFI functions non-constructible - #65184
Conversation
nodejs-github-bot
commented
Aug 10, 2026
Review requested:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #65184 +/- ##
==========================================
+ Coverage 90.30% 90.32% +0.01%
==========================================
Files 760 760 Lines 248526 248530 +4 Branches 46886 46895 +9 ==========================================
+ Hits 224439 224478 +39 + Misses 15515 15465 -50 - Partials 8572 8587 +15
🚀 New features to boost your workflow:
|
nodejs-github-bot
commented
Aug 10, 2026
trivikr
commented
Aug 11, 2026
Converted to draft since not ok 3 ffi/test-ffi-dynamic-library --- duration_ms: 800.27300 severity: fail exitcode: 1 stack: |- Test failure: 'FFI functions are not constructible' Location: test/ffi/test-ffi-dynamic-library.js:70:1 AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: true !== false at TestContext.<anonymous> (/home/iojs/build/workspace/node-test-commit-aix/nodes/aix72-power9/test/ffi/test-ffi-dynamic-library.js:77:12) at Test.runInAsyncScope (node:async_hooks:227:14) at Test.run (node:internal/test_runner/test:1397:25) at Test.processPendingSubtests (node:internal/test_runner/test:969:18) at Test.postRun (node:internal/test_runner/test:1537:19) at Test.run (node:internal/test_runner/test:1462:12) at process.processTicksAndRejections (node:internal/process/task_queues:104:5) at async Test.processPendingSubtests (node:internal/test_runner/test:969:7) { generatedMessage: true, code: 'ERR_ASSERTION', actual: true, expected: false, operator: 'strictEqual', diff: 'simple' } (node:31457608) ExperimentalWarning: FFI is an experimental feature and might change at any time (Use `node --trace-warnings ...` to show where the warning was created) ... |
edd2a79 to
317ff65Comparetrivikr
commented
Aug 11, 2026
The AIX failure occurred because AIX uses neither of the JavaScript wrapper paths updated in the original commit. AIX/PowerPC is excluded from the Fast API path because there is no PPC64 big-endian trampoline emitter. The shared-buffer path is also disabled on big-endian platforms. Consequently, AIX falls back to the generic native function created with
I amended the commit to create the generic fallback and shared-buffer slow-path functions with |
Use concise method functions for Fast API and shared-buffer wrappers, and create native fallback functions with ConstructorBehavior::kThrow, so FFI functions remain non-constructible on all invocation paths. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol
317ff65 to
4c9023cCompare
This comment was marked as outdated.
This comment was marked as outdated.
nodejs-github-bot
commented
Aug 11, 2026
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Aug 17, 2026
Landed in 8f6c69f |
Use concise method functions for Fast API and shared-buffer wrappers, and create native fallback functions with ConstructorBehavior::kThrow, so FFI functions remain non-constructible on all invocation paths. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol PR-URL: #65184Fixes: #65183 Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Use concise method functions for Fast API and shared-buffer wrappers, and create native fallback functions with ConstructorBehavior::kThrow, so FFI functions remain non-constructible on all invocation paths. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol PR-URL: #65184Fixes: #65183 Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Fixes: #65183
Use concise method functions for Fast API and shared-buffer wrappers, and create native fallback functions with ConstructorBehavior::kThrow, so FFI functions remain non-constructible on all invocation paths.
Assisted-by: codex:gpt-5.6-sol