deno
6aa3354a - fix(ext/node): fix Buffer.concat, expose internal/buffer, implement markAsUntransferable (#32760)

Commit
124 days ago
fix(ext/node): fix Buffer.concat, expose internal/buffer, implement markAsUntransferable (#32760) ## Summary Fixes 3 Buffer compat tests from #32706 and fixes #31824. - **Buffer.concat**: Use `TypedArrayPrototypeGetByteLength` instead of `.length` to prevent spoofed length getters from causing uninitialized memory exposure - **internal/buffer**: Register as a requireable internal module and export `utf8Write` - **markAsUntransferable**: Implement using V8's `set_detach_key` API. Applied to the Buffer pool so `ArrayBuffer.prototype.transfer()` throws `TypeError` instead of detaching the shared pool. This prevents the bug where transferring a Buffer's backing store would break all subsequent `Buffer.from()` calls (#31824) ### Enabled tests - `test-buffer-concat.js` - `test-buffer-write-fast.js` - `test-buffer-pool-untransferable.js` Closes #31824 --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
Parents
Loading