Title: Regression in Node.js 26.8.0: aligned Buffer pool breaks multi-byte typed-array views · Issue #65601 · nodejs/node · GitHub
Open Graph Title: Regression in Node.js 26.8.0: aligned Buffer pool breaks multi-byte typed-array views · Issue #65601 · nodejs/node
X Title: Regression in Node.js 26.8.0: aligned Buffer pool breaks multi-byte typed-array views · Issue #65601 · nodejs/node
Description: Version 26.8.0, 26.8.1 Platform Linux, macOS, and Windows Subsystem Buffer What steps will reproduce the bug? const buffer = Buffer.allocUnsafe(8); console.log({ node: process.version, bufferLength: buffer.length, backingLength: buffer.b...
Open Graph Description: Version 26.8.0, 26.8.1 Platform Linux, macOS, and Windows Subsystem Buffer What steps will reproduce the bug? const buffer = Buffer.allocUnsafe(8); console.log({ node: process.version, bufferLength...
X Description: Version 26.8.0, 26.8.1 Platform Linux, macOS, and Windows Subsystem Buffer What steps will reproduce the bug? const buffer = Buffer.allocUnsafe(8); console.log({ node: process.version, bufferLength...
Opengraph URL: https://github.com/nodejs/node/issues/65601
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Regression in Node.js 26.8.0: aligned Buffer pool breaks multi-byte typed-array views","articleBody":"### Version\n\n26.8.0, 26.8.1\n\n### Platform\n\n```text\nLinux, macOS, and Windows\n```\n\n### Subsystem\n\nBuffer\n\n### What steps will reproduce the bug?\n\n```\nconst buffer = Buffer.allocUnsafe(8);\n\nconsole.log({\n node: process.version,\n bufferLength: buffer.length,\n backingLength: buffer.buffer.byteLength,\n byteOffset: buffer.byteOffset,\n});\n\nnew Uint32Array(buffer.buffer, buffer.byteOffset); // throws RangeError\n```\n\n### How often does it reproduce? Is there a required condition?\n\nConsistently when:\n- \n- The Buffer is allocated from the default pool.\n- The typed-array element size does not divide the pool’s 65,599-byte backing allocation.\n- The typed-array constructor omits its explicit length.\n\nSmall files returned by readFileSync() meet these conditions.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nCreating a typed-array view at the Buffer’s aligned byteOffset should not fail because of invisible padding after the Buffer view. This worked through Node.js 26.7.0.\n\n### What do you see instead?\n\n```\nRangeError: byte length of Uint32Array should be a multiple of 4\n```\n\nThe Buffer is eight bytes, but its pooled backing `ArrayBuffer` is 65,599 bytes.\n\n### Additional information\n\nThis appears related to [nodejs/node#65003](https://github.com/nodejs/node/pull/65003), which changed the pool to an aligned allocation of poolSize + alignment - 1 bytes.\n- This is a regression introduced in Node.js 26.8.0. The reproduction succeeds on 26.7.0 and consistently throws on 26.8.0 and 26.8.1.\n - Node.js 26.7.0: backing length 65,536; succeeds\n - Node.js 26.8.0+: backing length 65,599; throws\n- V8 is unchanged: 14.6.202.34-node.28\n- Supplying an explicit typed-array length works around the issue.\n- This surfaced in [rocksdb-js CI](https://github.com/HarperFast/rocksdb-js/actions/runs/33042839856/job/98464401877?pr=800).","author":{"url":"https://github.com/cb1kenobi","@type":"Person","name":"cb1kenobi"},"datePublished":"2026-08-27T19:30:02Z","url":"https://github.com/nodejs/node/issues/65601"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d6d87a33-bb80-d6f1-4150-777152712ce1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D21C:169E62:5F3533:7AFF92:6AED2975 |
| html-safe-nonce | e243b5d365b97044943d44e003fd58e24718518167271d909e21b4d6036771a4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjFDOjE2OUU2Mjo1RjM1MzM6N0FGRjkyOjZBRUQyOTc1IiwidmlzaXRvcl9pZCI6IjU0Mzg1MDEwNzc2MzM1NDI1MTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ed4901c8945328c1917fec96c09e19eff650e9b7aafb6efbd4eb2302601f97f2 |
| hovercard-subject-tag | issue:5271377151 |
| 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/65601/issue_layout |
| twitter:image | https://opengraph.githubassets.com/74d1edd1c78f389f5ed3d7edacfe7e5d68e2c84682397a663bb8a024ba11a368/nodejs/node/issues/65601 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/74d1edd1c78f389f5ed3d7edacfe7e5d68e2c84682397a663bb8a024ba11a368/nodejs/node/issues/65601 |
| og:image:alt | Version 26.8.0, 26.8.1 Platform Linux, macOS, and Windows Subsystem Buffer What steps will reproduce the bug? const buffer = Buffer.allocUnsafe(8); console.log({ node: process.version, bufferLength... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cb1kenobi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d95365dda0576efe9b71f45807595e396bd0ca9286fba5367a05048e6ddf8f2 |
| 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 | 98b41fa4b5635ceb45a4c54320fced73817ff290 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width