Title: ffi: failed dlopen() leaks the libuv error message · Issue #67006 · nodejs/node · GitHub
Open Graph Title: ffi: failed dlopen() leaks the libuv error message · Issue #67006 · nodejs/node
X Title: ffi: failed dlopen() leaks the libuv error message · Issue #67006 · nodejs/node
Description: Version main Platform macOS Subsystem ffi What steps will reproduce the bug? import { dlopen } from 'node:ffi'; const path = '/nonexistent/' + 'x'.repeat(200) + '.dylib'; const run = (n) => { for (let i = 0; i < n; i++) { try { dlopen(pa...
Open Graph Description: Version main Platform macOS Subsystem ffi What steps will reproduce the bug? import { dlopen } from 'node:ffi'; const path = '/nonexistent/' + 'x'.repeat(200) + '.dylib'; const run = (n) => { for (...
X Description: Version main Platform macOS Subsystem ffi What steps will reproduce the bug? import { dlopen } from 'node:ffi'; const path = '/nonexistent/' + 'x'.repeat(200) + '.dylib&...
Opengraph URL: https://github.com/nodejs/node/issues/67006
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ffi: failed dlopen() leaks the libuv error message","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nmacOS\n```\n\n### Subsystem\n\nffi\n\n### What steps will reproduce the bug?\n\n```js\nimport { dlopen } from 'node:ffi';\n\nconst path = '/nonexistent/' + 'x'.repeat(200) + '.dylib';\nconst run = (n) => {\n for (let i = 0; i \u003c n; i++) {\n try { dlopen(path, {}); } catch {}\n }\n};\n\nrun(1000);\nglobalThis.gc();\nconst before = process.memoryUsage().rss;\n\nrun(400000);\nglobalThis.gc();\nconsole.log((process.memoryUsage().rss - before) / 400000, 'B/call');\n```\n\nRun with\n```console\nnode --no-warnings --expose-gc repro.mjs\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\nA failed `dlopen()` should not hold on to native memory. RSS stays flat\n```console\n14.45888 B/call\n```\n\n### What do you see instead?\n\n```console\n1042.55488 B/call\n```\n\nRSS goes up by about 1 KB for each failed call (60 -> 477 MB over 400k calls).\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-10-25T22:16:06Z","url":"https://github.com/nodejs/node/issues/67006"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7872801c-d39d-d7b2-ca01-f0c99bef67d2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A532:A00D0:1AB8D6:253FFA:6AFBE024 |
| html-safe-nonce | 195026562d940ac6193dead12e8aefed503caaa96bb3ed588f787b6a757762ac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTMyOkEwMEQwOjFBQjhENjoyNTNGRkE6NkFGQkUwMjQiLCJ2aXNpdG9yX2lkIjoiMzk1MzcxNjczMTQ5MDA2NjQ2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f1927afaf8b245d528f86e29abb34afd667e3ed9417439556ffe6c828b76df65 |
| hovercard-subject-tag | issue:6029988133 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/67006/issue_layout |
| twitter:image | https://opengraph.githubassets.com/54f86360d3d09c3d6241799827f2aa24f240a8961adf81513ab4974adeec878d/nodejs/node/issues/67006 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/54f86360d3d09c3d6241799827f2aa24f240a8961adf81513ab4974adeec878d/nodejs/node/issues/67006 |
| og:image:alt | Version main Platform macOS Subsystem ffi What steps will reproduce the bug? import { dlopen } from 'node:ffi'; const path = '/nonexistent/' + 'x'.repeat(200) + '.dylib'; const run = (n) => { for (... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 744d4381b1c4dbd6d8736c7d7e5bbe7dc11217584e457a3555020c631764e8ec |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | df859c48a4c8b4c0009c19bb4e82101aacb4b998 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width