GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ffi: define function pointer property as own data property by trivikr · Pull Request #67170 · nodejs/node

Conversation

@trivikr

@trivikr trivikr commented Nov 1, 2026

Copy link
Copy Markdown
Member

Fixes: #67169

CreateFunction assigned pointer with Object::Set, which walks Function.prototype. A non-writable inherited pointer turned the store into a silent no-op, so the function reported the inherited value instead of its native address. Use CreateDataProperty.


Assisted-by: claude:opus-5.5

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@trivikr
ffi: define function pointer property as own data property
63e5cfa
`CreateFunction` assigned `pointer` with `Object::Set`, which walks
`Function.prototype`. A non-writable inherited `pointer` turned the
store into a silent no-op, so the function reported the inherited
value instead of its native address. Use `CreateDataProperty`.

Signed-off-by: Trivikram Kamat <[email protected]>
Assisted-by: claude:opus-5.5
@nodejs-github-bot

nodejs-github-bot commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/ffi
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Nov 1, 2026
@trivikr trivikr added ffi Issues and PRs related to experimental Foreign Function Interface support. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Nov 1, 2026
@codecov

codecov Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.68%. Comparing base (e97c75e) to head (63e5cfa).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/node_ffi.cc 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #67170      +/-   ##
==========================================
- Coverage   90.68%   90.68%   -0.01%     
==========================================
  Files         797      797              
  Lines      278790   278790              
  Branches    53617    53607      -10     
==========================================
- Hits       252834   252809      -25     
- Misses      16303    16345      +42     
+ Partials     9653     9636      -17     
Files with missing lines Coverage Δ
src/node_ffi.cc 73.14% <0.00%> (ø)

... and 36 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax
addaleax approved these changes Nov 1, 2026
View reviewed changes
@trivikr trivikr added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Nov 1, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 1, 2026
@nodejs-github-bot

nodejs-github-bot commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78773/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ShogunPanda
ShogunPanda approved these changes Nov 1, 2026
View reviewed changes
@trivikr trivikr added the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 1, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 2265763 into nodejs:main Nov 3, 2026
84 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Landed in 2265763

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Nov 3, 2026
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@trivikr @aduh95
ffi: define function pointer property as own data property
89db5c3
`CreateFunction` assigned `pointer` with `Object::Set`, which walks
`Function.prototype`. A non-writable inherited `pointer` turned the
store into a silent no-op, so the function reported the inherited
value instead of its native address. Use `CreateDataProperty`.

Signed-off-by: Trivikram Kamat <[email protected]>
Assisted-by: claude:opus-5.5
PR-URL: #67170
Fixes: #67169
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 11, 2026
2026-11-12, Version 27.0.0-alpha.0.1.0 (Alpha) #67415
Merged
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@trivikr @aduh95
ffi: define function pointer property as own data property
4f1597c
`CreateFunction` assigned `pointer` with `Object::Set`, which walks
`Function.prototype`. A non-writable inherited `pointer` turned the
store into a silent no-op, so the function reported the inherited
value instead of its native address. Use `CreateDataProperty`.

Signed-off-by: Trivikram Kamat <[email protected]>
Assisted-by: claude:opus-5.5
PR-URL: #67170
Fixes: #67169
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 20, 2026
2026-11-30, Version 26.14.0 'Lithium' (LTS) #67664
Open
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@trivikr @gabylb
ffi: define function pointer property as own data property
83a3248
`CreateFunction` assigned `pointer` with `Object::Set`, which walks
`Function.prototype`. A non-writable inherited `pointer` turned the
store into a silent no-op, so the function reported the inherited
value instead of its native address. Use `CreateDataProperty`.

Signed-off-by: Trivikram Kamat <[email protected]>
Assisted-by: claude:opus-5.5
PR-URL: nodejs#67170
Fixes: nodejs#67169
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ShogunPanda ShogunPanda ShogunPanda approved these changes
@addaleax addaleax addaleax approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. c++ Issues and PRs that require attention from people who are familiar with C++. ffi Issues and PRs related to experimental Foreign Function Interface support. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

ffi: function .pointer is lost when Function.prototype.pointer is non-writable

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@trivikr @nodejs-github-bot @ShogunPanda @addaleax
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.