René's URL Explorer Experiment


Title: Buffer.prototype.indexOf returns a negative (int32-wrapped) position for matches beyond 2 GiB · Issue #66294 · nodejs/node · GitHub

Open Graph Title: Buffer.prototype.indexOf returns a negative (int32-wrapped) position for matches beyond 2 GiB · Issue #66294 · nodejs/node

X Title: Buffer.prototype.indexOf returns a negative (int32-wrapped) position for matches beyond 2 GiB · Issue #66294 · nodejs/node

Description: Version v26.10.0 and v24.21.0 (official win-x64 builds); v22.22.2 on Linux x64; first seen on v24.16.0 and on Node 24.20.0 as embedded in Electron 43.6.0 Platform Windows 10 22H2 x64 (build 19045.6466), 64 GB RAM; also Linux x86_64 Subsy...

Open Graph Description: Version v26.10.0 and v24.21.0 (official win-x64 builds); v22.22.2 on Linux x64; first seen on v24.16.0 and on Node 24.20.0 as embedded in Electron 43.6.0 Platform Windows 10 22H2 x64 (build 19045.6...

X Description: Version v26.10.0 and v24.21.0 (official win-x64 builds); v22.22.2 on Linux x64; first seen on v24.16.0 and on Node 24.20.0 as embedded in Electron 43.6.0 Platform Windows 10 22H2 x64 (build 19045.6...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Buffer.prototype.indexOf returns a negative (int32-wrapped) position for matches beyond 2 GiB","articleBody":"### Version\n\nv26.10.0 and v24.21.0 (official win-x64 builds); v22.22.2 on Linux x64; first seen on v24.16.0 and on Node 24.20.0 as embedded in Electron 43.6.0\n\n### Platform\n\n```text\nWindows 10 22H2 x64 (build 19045.6466), 64 GB RAM; also Linux x86_64\n```\n\n### Subsystem\n\nbuffer\n\n### What steps will reproduce the bug?\n\n```js\nconst big = Buffer.alloc(2 ** 31 + 4096, 97);\nconst hit = 2 ** 31 + 100;\nbig[hit] = 10;\nconsole.log(big.indexOf(10, 2 ** 31 + 50));                 // number needle\nconsole.log(big.indexOf(Buffer.from([10]), 2 ** 31 + 50));  // Buffer needle\nconsole.log(big.indexOf('\\n', 2 ** 31 + 50));               // string needle\n```\n\nFull script with a below-2 GiB control: `indexof_2gib.js` in https://gist.github.com/BlackWhiteYellow/f44e367254db24fbe20d7fe10002ab1f (needs ~4.5 GB of free RAM).\n\n### How often does it reproduce? Is there a required condition?\n\nAlways, when the match position is ≥ 2^31, on every version and platform listed above. Matches below 2^31 in a buffer just under 2 GiB are returned correctly.\n\n### What is the expected behavior? Why is that the expected behavior?\n\n`2147483748`, the byte offset of the match. `Buffer.alloc` accepts lengths above 2^31 on 64-bit, so `indexOf` should return offsets in that range, as documented for the method.\n\n### What do you see instead?\n\n`-2147483548` for all three needle types, which equals `2147483748 − 2^32` (the offset truncated to int32).\n\n### Additional information\n\nConsumers that treat only `-1` as \"not found\" then move their cursor backwards; in the Claude Code VS Code extension this turns into an endless re-parse loop and an out-of-memory crash of the editor's extension host (downstream report linked in a comment below). nodejs/node#62711 (commit 49198d2, the fix for #62873) changed how the `end` parameter of indexOf/lastIndexOf is handled; it does not change how the found position is returned.","author":{"url":"https://github.com/BlackWhiteYellow","@type":"Person","name":"BlackWhiteYellow"},"datePublished":"2026-09-25T18:12:53Z","url":"https://github.com/nodejs/node/issues/66294"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5aa242f9-1901-7a77-8c4b-91a8048c33a8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAD7E:257BEE:9F53E1:D371F9:6AED3162
html-safe-noncead45cea053f19765d155eb854509af1b11445a0ae3182252b14ab01f9866f27c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRDdFOjI1N0JFRTo5RjUzRTE6RDM3MUY5OjZBRUQzMTYyIiwidmlzaXRvcl9pZCI6IjE2MDczMTQ1NDIyMTMwMTc5NTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac73eed47af3b5ffbb6322d1bd0a2f6988841143ddef129b52640527ab35c5112f
hovercard-subject-tagissue:5586695573
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/66294/issue_layout
twitter:imagehttps://opengraph.githubassets.com/56365971b2125bdaa60c6f1c413c378d382399e51bb1d493cf77a3c703366d0d/nodejs/node/issues/66294
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/56365971b2125bdaa60c6f1c413c378d382399e51bb1d493cf77a3c703366d0d/nodejs/node/issues/66294
og:image:altVersion v26.10.0 and v24.21.0 (official win-x64 builds); v22.22.2 on Linux x64; first seen on v24.16.0 and on Node 24.20.0 as embedded in Electron 43.6.0 Platform Windows 10 22H2 x64 (build 19045.6...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBlackWhiteYellow
hostnamegithub.com
expected-hostnamegithub.com
Nonee51d0b7b5ab34b1688c05b54c3ed17b8658b2fa9bca973a9c740683ccb12cf4a
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
release59ebb7b901cc154ecc179a44f266fcf69f343b30
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/66294#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F66294
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%2F66294
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/66294
Reloadhttps://github.com/nodejs/node/issues/66294
Reloadhttps://github.com/nodejs/node/issues/66294
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues656 (656)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/pulse
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66294
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66294
#66325https://github.com/nodejs/node/pull/66325
Buffer.prototype.indexOf returns a negative (int32-wrapped) position for matches beyond 2 GiBhttps://github.com/nodejs/node/issues/66294#top
#66325https://github.com/nodejs/node/pull/66325
https://github.com/BlackWhiteYellow
BlackWhiteYellowhttps://github.com/BlackWhiteYellow
on Sep 25, 2026https://github.com/nodejs/node/issues/66294#issue-5586695573
https://gist.github.com/BlackWhiteYellow/f44e367254db24fbe20d7fe10002ab1fhttps://gist.github.com/BlackWhiteYellow/f44e367254db24fbe20d7fe10002ab1f
#62711https://github.com/nodejs/node/pull/62711
49198d2https://github.com/nodejs/node/commit/49198d2313f02e6165981fbd270e144ae6d6d678
#62873https://github.com/nodejs/node/issues/62873
https://github.com/BlackWhiteYellow
BlackWhiteYellowhttps://github.com/BlackWhiteYellow
on Sep 25, 2026https://github.com/nodejs/node/issues/66294#issuecomment-5837453786
anthropics/claude-code#97229https://github.com/anthropics/claude-code/issues/97229
Dansatchhttps://github.com/Dansatch
on Sep 26, 2026https://github.com/nodejs/node/issues/66294#event-31900882218
buffer: fix negative index for large buffershttps://github.com/Dansatch/node/commit/04a1fd7b87e0a038d84659adf1666c601f17eda8
04a1fd7https://github.com/Dansatch/node/commit/04a1fd7b87e0a038d84659adf1666c601f17eda8
buffer: fix negative index for large buffershttps://github.com/Dansatch/node/commit/7580065043761b0c04cf06ac4322c5c790760766
7580065https://github.com/Dansatch/node/commit/7580065043761b0c04cf06ac4322c5c790760766
nodejs-github-bothttps://github.com/nodejs-github-bot
completedhttps://github.com/nodejs/node/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#66325https://github.com/nodejs/node/pull/66325
on Sep 28, 2026https://github.com/nodejs/node/issues/66294#event-32016201859
pullhttps://github.com/apps/pull
on Sep 28, 2026https://github.com/nodejs/node/issues/66294#event-32016444788
buffer: fix negative index for large buffershttps://github.com/Jahid11978/node/commit/e6d47201e15fba0537ebf9f91840f7cabbb868e3
e6d4720https://github.com/Jahid11978/node/commit/e6d47201e15fba0537ebf9f91840f7cabbb868e3
aduh95https://github.com/aduh95
on Sep 28, 2026https://github.com/nodejs/node/issues/66294#event-32031898670
buffer: fix negative index for large buffershttps://github.com/nodejs/node/commit/ce4fbf032cc444803d9ea18016fea66d5ac4ef35
ce4fbf0https://github.com/nodejs/node/commit/ce4fbf032cc444803d9ea18016fea66d5ac4ef35
buffer: fix negative index for large buffershttps://github.com/nodejs/node/commit/d0a72f2c12977150e3e2841e69914865d5cb0915
d0a72f2https://github.com/nodejs/node/commit/d0a72f2c12977150e3e2841e69914865d5cb0915
HoonDongKanghttps://github.com/HoonDongKang
on Sep 29, 2026https://github.com/nodejs/node/issues/66294#event-32042080056
buffer: fix negative index for large buffershttps://github.com/HoonDongKang/node/commit/905372a9168e61460ec0a365190f85c0723b54a2
905372ahttps://github.com/HoonDongKang/node/commit/905372a9168e61460ec0a365190f85c0723b54a2
aduh95https://github.com/aduh95
on Oct 23, 2026https://github.com/nodejs/node/issues/66294#event-34094394469
buffer: fix negative index for large buffershttps://github.com/nodejs/node/commit/c53447a002ec543583b7bbed0439fdb9b62a7ae2
c53447ahttps://github.com/nodejs/node/commit/c53447a002ec543583b7bbed0439fdb9b62a7ae2
buffer: fix negative index for large buffershttps://github.com/nodejs/node/commit/47c08e03eece35193e037cf32547bd79f4f35795
47c08e0https://github.com/nodejs/node/commit/47c08e03eece35193e037cf32547bd79f4f35795
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/66294
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/66294
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

Viewport: width=device-width


URLs of crawlers that visited me.