René's URL Explorer Experiment


Title: clock_time_get rejects valid WASI pointer arguments >= 0x80000000(2G) · Issue #62671 · nodejs/node · GitHub

Open Graph Title: clock_time_get rejects valid WASI pointer arguments >= 0x80000000(2G) · Issue #62671 · nodejs/node

X Title: clock_time_get rejects valid WASI pointer arguments >= 0x80000000(2G) · Issue #62671 · nodejs/node

Description: Version v24.14.1 Platform Darwin XQ4PWYXX93 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64 Subsystem wasi What steps will reproduce the bug? Run this with node repro.m...

Open Graph Description: Version v24.14.1 Platform Darwin XQ4PWYXX93 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64 Subsystem wasi What steps will repro...

X Description: Version v24.14.1 Platform Darwin XQ4PWYXX93 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64 Subsystem wasi What steps will repro...

Opengraph URL: https://github.com/nodejs/node/issues/62671

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"clock_time_get  rejects valid WASI pointer arguments >= 0x80000000(2G)","articleBody":"\n**Version**\n\n`v24.14.1`\n\n**Platform**\n\n```text\nDarwin XQ4PWYXX93 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64\n```\n\n**Subsystem**\n\n`wasi`\n\n**What steps will reproduce the bug?**\n\nRun this with `node repro.mjs`(or run `node reproduce.mjs` in \nhttps://github.com/hardfist/node-wasi-2gb-bug and this is the cause of Rspack CI failure https://github.com/web-infra-dev/rspack/actions/runs/24226483089/job/70729993137?pr=13655#step:13:104\n\n```js\nimport { WASI } from 'node:wasi';\n\nconst wasm = Buffer.from(\n  'AGFzbQEAAAABDwNgA39+fwF/YAABf2AAAAIpARZ3YXNpX3NuYXBzaG90X3ByZXZpZXcxDmNsb2NrX3RpbWVfZ2V0AAADBQQBAQECBQUBAIGAAgdHBQZtZW1vcnkCAA50ZXN0X2Nsb2NrX2xvdwABDnRlc3RfY2xvY2tfbWlkAAIPdGVzdF9jbG9ja19oaWdoAAMGX3N0YXJ0AAQKMwQMAEEAQsCEPUEAEAALEABBAELAhD1B8P///wcQAAsQAEEAQsCEPUGAgICAeBAACwIACw==',\n  'base64',\n);\n\nconst wasi = new WASI({ version: 'preview1' });\nconst module = await WebAssembly.compile(wasm);\nconst instance = await WebAssembly.instantiate(module, {\n  wasi_snapshot_preview1: wasi.wasiImport,\n});\n\ntry {\n  wasi.start(instance);\n} catch {}\n\nfor (const [label, fn] of [\n  ['0x00000000', () => instance.exports.test_clock_low()],\n  ['0x7FFFFFF0', () => instance.exports.test_clock_mid()],\n  ['0x80000000', () => instance.exports.test_clock_high()],\n]) {\n  const errno = fn();\n  console.log(`${label}: errno=${errno}`);\n}\n```\n\nThis embeds a tiny WASM module that:\n\n- imports `wasi_snapshot_preview1.clock_time_get`\n- allocates `32769` pages of memory (`2GB + 64KB`)\n- calls `clock_time_get` with result pointers `0x00000000`, `0x7FFFFFF0`, and `0x80000000`\n\n**How often does it reproduce? Is there a required condition?**\n\nIt reproduces every time for me on `v24.14.1` when the WASI function receives an `i32` argument with the high bit set, such as pointer `0x80000000`, and the module has enough linear memory for that offset. The repro needs about 2GB of free RAM because the module allocates `32769` pages.\n\n**What is the expected behavior? Why is that the expected behavior?**\n\nAll three calls should succeed:\n\n```text\n0x00000000: errno=0\n0x7FFFFFF0: errno=0\n0x80000000: errno=0\n```\n\n`0x80000000` is a valid in-bounds offset for a `32769`-page memory, and WASI pointer parameters are 32-bit offsets. Node should accept the full 32-bit bit-pattern range for these arguments and then rely on the existing memory bounds checks to reject only truly out-of-bounds accesses.\n\n**What do you see instead?**\n\nThe third call returns `EINVAL` (`28`) even though the pointer is within bounds:\n\n```text\n0x00000000: errno=0\n0x7FFFFFF0: errno=0\n0x80000000: errno=28\n```\n\n**Additional information**\n\nI traced this to the WASI slow callback path in [`src/node_wasi.cc`](https://github.com/nodejs/node/blob/main/src/node_wasi.cc).\n\n`CheckType\u003cuint32_t>()` currently does:\n\n```cpp\ntemplate \u003c>\nbool CheckType\u003cuint32_t>(Local\u003cValue> value) {\n  return value->IsUint32();\n}\n```\n\nBut when Wasm passes `i32.const 0x80000000`, V8 appears to surface that value to the JS-facing slow callback as the Number `-2147483648`. That fails `IsUint32()`, so `SlowCallback()` returns `UVWASI_EINVAL` before the syscall implementation runs.\n\n`ConvertType\u003cuint32_t>()` in the same file already does:\n\n```cpp\ntemplate \u003c>\nuint32_t ConvertType(Local\u003cValue> value) {\n  return value.As\u003cUint32>()->Value();\n}\n```\n\nSo this looks like a validation mismatch rather than a conversion or bounds-checking issue. If I am reading the code correctly, `CheckType\u003cuint32_t>()` probably needs to accept the signed JS representation that Wasm `i32` values can take when the high bit is set, or otherwise validate these parameters in a way that is not sensitive to JS signedness.\n","author":{"url":"https://github.com/hardfist","@type":"Person","name":"hardfist"},"datePublished":"2026-04-10T14:08:58Z","url":"https://github.com/nodejs/node/issues/62671"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0ab7af8d-08c4-8b6a-c1e5-f3cf4273c407
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC40C:C397B:141BA5:19CF07:6B0339AE
html-safe-nonce3f1ec4eba67462cb63be335dc56ccd7f9c5f68d3da80af7c5c2059eb8fc436bb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDBDOkMzOTdCOjE0MUJBNToxOUNGMDc6NkIwMzM5QUUiLCJ2aXNpdG9yX2lkIjoiMjIxOTMzODEwMDQ3MDEzNTIxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccb80c928a4abf1716dbf17c1f369d1b085ed07b5c3ebdfa14066395a8b82b361
hovercard-subject-tagissue:4239691887
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/62671/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e1e43590a0f867618b7dd77a8abec17d97bc6bdb640fbb9595f6ef135afc7390/nodejs/node/issues/62671
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e1e43590a0f867618b7dd77a8abec17d97bc6bdb640fbb9595f6ef135afc7390/nodejs/node/issues/62671
og:image:altVersion v24.14.1 Platform Darwin XQ4PWYXX93 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:55 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6031 arm64 Subsystem wasi What steps will repro...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamehardfist
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/62671#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F62671
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F62671
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/62671
Reloadhttps://github.com/nodejs/node/issues/62671
Reloadhttps://github.com/nodejs/node/issues/62671
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues637 (637)https://github.com/nodejs/node/issues
Pull requests666 (666)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/insights
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/62671
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/62671
#66636https://github.com/nodejs/node/pull/66636
clock_time_get rejects valid WASI pointer arguments >= 0x80000000(2G)https://github.com/nodejs/node/issues/62671#top
#66636https://github.com/nodejs/node/pull/66636
https://github.com/hardfist
hardfisthttps://github.com/hardfist
on Apr 10, 2026https://github.com/nodejs/node/issues/62671#issue-4239691887
https://github.com/hardfist/node-wasi-2gb-bughttps://github.com/hardfist/node-wasi-2gb-bug
https://github.com/web-infra-dev/rspack/actions/runs/24226483089/job/70729993137?pr=13655#step:13:104https://github.com/web-infra-dev/rspack/actions/runs/24226483089/job/70729993137?pr=13655#step:13:104
src/node_wasi.cchttps://github.com/nodejs/node/blob/main/src/node_wasi.cc
hardfisthttps://github.com/hardfist
on Apr 10, 2026https://github.com/nodejs/node/issues/62671#event-24383229032
hardfisthttps://github.com/hardfist
on Apr 10, 2026https://github.com/nodejs/node/issues/62671#event-24383233871
hardfisthttps://github.com/hardfist
on Apr 10, 2026https://github.com/nodejs/node/issues/62671#event-24383239894
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Jul 20, 2026https://github.com/nodejs/node/issues/62671#issuecomment-5019603629
GitHub Actionshttps://help.github.com/en/actions
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jul 20, 2026https://github.com/nodejs/node/issues/62671#event-28198459636
https://github.com/hardfist
hardfisthttps://github.com/hardfist
on Jul 23, 2026https://github.com/nodejs/node/issues/62671#issuecomment-5052971425
github-actionshttps://github.com/apps/github-actions
staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22stale%22
on Jul 23, 2026https://github.com/nodejs/node/issues/62671#event-28358061744
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#66636https://github.com/nodejs/node/pull/66636
on Oct 19, 2026https://github.com/nodejs/node/issues/62671#event-33665931454
nodejs-github-bothttps://github.com/nodejs-github-bot
on Oct 19, 2026https://github.com/nodejs/node/issues/62671#event-33665932013
wasi: accept wasm i32 pointers with high bit sethttps://github.com/nodejs/node/commit/1d5f8e6cba0cd5a7f939165a0bd0ca6c09e13ad1
1d5f8e6https://github.com/nodejs/node/commit/1d5f8e6cba0cd5a7f939165a0bd0ca6c09e13ad1
aduh95https://github.com/aduh95
on Nov 12, 2026https://github.com/nodejs/node/issues/62671#event-35938468482
wasi: accept wasm i32 pointers with high bit sethttps://github.com/nodejs/node/commit/817eee082a33cb30ebe56fa7b7b1aaec56f499c8
817eee0https://github.com/nodejs/node/commit/817eee082a33cb30ebe56fa7b7b1aaec56f499c8
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/62671
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/62671
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.