Skip to content

src,ffi: create fast-call metadata Symbols lazily #60186

src,ffi: create fast-call metadata Symbols lazily

src,ffi: create fast-call metadata Symbols lazily #60186

Triggered via pull request September 13, 2026 12:28
@mcollinamcollina
opened #66015
Status Failure
Total duration 39s
Artifacts

commit-lint.yml

on: pull_request_target
lint-commit-message
29s
lint-commit-message
Fit to window
Zoom out
Zoom in

Annotations

1 error
lint-commit-message
# 9661374b508f77391605dad12e195dbc6bfac127 ok 1 assisted-by-is-trailer: Assisted-by is a trailer ok 2 co-authored-by-is-trailer: no Co-authored-by metadata ok 3 fixes-url: skipping fixes-url # SKIP ok 4 line-after-title: blank line after title not ok 5 line-length: Line should be <= 72 columns. --- { found: 73, compare: '<=', wanted: 72, at: { line: 4, column: 72, body: [ '', 'The FFI fast-call wrappers key per-function metadata on raw FFI functions', 'using two per-isolate Symbols (kFastArguments / kFastBufferInvoke) that were', 'declared in src/env_properties.h. Everything in env_properties.h is allocated', "while the startup snapshot is built, so each Symbol advances the isolate's", 'identity-hash RNG before Object.prototype / Function.prototype receive their', 'snapshot identity hashes. In the snapshot produced for Node 26.4.0+ this', 'shifted those hashes so a function map (a function whose `length` was', 'redefined) and a plain-object map (an object literal with an accessor) collide', "in V8's 64-slot NormalizedMapCache. Every store into such objects then misses", 'the inline cache, and the repro reported in the linked issue is roughly 7x', 'slower.', '', "Create the two Symbols lazily in the FFI binding's Initialize, on the first", "run of internalBinding('ffi') at runtime, instead of declaring them in", 'env_properties.h. They are therefore not allocated during snapshot', "serialization and no longer bias the snapshot's prototype identity hashes.", 'Their export, property layout, and the fast-call feature behavior are', 'unchanged.', '', 'Refs: https://github.com/nodejs/node/issues/66011', '', 'Signed-off-by: Matteo Collina <matteo.collina@gmail.com>', 'Assisted-by: Pi' ] } } ... not ok 6 line-length: Line should be <= 72 columns. --- { found: 76, compare: '<=', wanted: 72, at: { line: 5, column: 72, body: [ '', 'The FFI fast-call wrappers key per-function metadata on raw FFI functions', 'using two per-isolate Symbols (kFastArguments / kFastBufferInvoke) that were', 'declared in src/env_properties.h. Everything in env_properties.h is allocated', "while the startup snapshot is built, so each Symbol advances the isolate's", 'identity-hash RNG before Object.prototype / Function.prototype receive their', 'snapshot identity hashes. In the snapshot produced for Node 26.4.0+ this', 'shifted those hashes so a function map (a function whose `length` was', 'redefined) and a plain-object map (an object literal with an accessor) collide', "in V8's 64-slot NormalizedMapCache. Every store into such objects then misses", 'the inline cache, and the repro reported in the linked issue is roughly 7x', 'slower.', '', "Create the two Symbols lazily in the FFI binding's Initialize, on the first", "run of internalBinding('ffi') at runtime, instead of declaring them in", 'env_properties.h. They are therefore not allocated during snapshot', "serialization and no longer bias the snapshot's prototype identity hashes.", 'Their export, property layout, and the fast-call feature behavior are', 'unchanged.', '', 'Refs: https://github.com/nodejs/node/issues/66011', '', 'Signed-off-by: Matteo Collina <matteo.collina@gmail.com>', 'Assisted-by: Pi' ] } } ... not ok 7 line-length: Line should be <= 72 columns. --- { found: 77, compare: '<=', wanted: 72, at: { line: 6, column: 72, body: [ '', 'The FFI fast-call wrappers key per-function metadata on raw FFI func