mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
## Summary - When a string exceeds `WTF::String::MaxLength` (~4GB), `bun.String.createUninitialized()` returns a `.Dead` tag - The C++ layer now properly throws `ERR_STRING_TOO_LONG` when this happens - Updated `String.toJS()` in Zig to return `bun.JSError!jsc.JSValue` instead of just `jsc.JSValue` - Updated ~40 Zig caller files to handle the error with `try` - C++ callers updated with `RETURN_IF_EXCEPTION` checks ## Test plan - [x] `bun bd test test/js/node/buffer.test.js` - 449 tests pass - [x] `bun bd test/js/node/test/parallel/test-buffer-tostring-rangeerror.js` - passes 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Claude Bot <claude-bot@bun.sh>
47 lines
1.2 KiB
JSON
47 lines
1.2 KiB
JSON
{
|
|
" != undefined": 0,
|
|
" == undefined": 0,
|
|
" catch bun.outOfMemory()": 0,
|
|
"!= alloc.ptr": 0,
|
|
"!= allocator.ptr": 0,
|
|
".arguments_old(": 263,
|
|
".jsBoolean(false)": 0,
|
|
".jsBoolean(true)": 0,
|
|
".stdDir()": 42,
|
|
".stdFile()": 16,
|
|
"// autofix": 148,
|
|
": [^=]+= undefined,$": 256,
|
|
"== alloc.ptr": 0,
|
|
"== allocator.ptr": 0,
|
|
"@import(\"bun\").": 0,
|
|
"EXCEPTION_ASSERT(!scope.exception())": 0,
|
|
"JSValue.false": 0,
|
|
"JSValue.true": 0,
|
|
"TODO: properly propagate exception upwards": 114,
|
|
"alloc.ptr !=": 0,
|
|
"alloc.ptr ==": 0,
|
|
"allocator.ptr !=": 1,
|
|
"allocator.ptr ==": 0,
|
|
"global.hasException": 28,
|
|
"globalObject.hasException": 47,
|
|
"globalThis.hasException": 123,
|
|
"std.StringArrayHashMap(": 1,
|
|
"std.StringArrayHashMapUnmanaged(": 11,
|
|
"std.StringHashMap(": 0,
|
|
"std.StringHashMapUnmanaged(": 0,
|
|
"std.Thread.Mutex": 1,
|
|
"std.debug.assert": 27,
|
|
"std.debug.dumpStackTrace": 0,
|
|
"std.debug.print": 0,
|
|
"std.enums.tagName(": 2,
|
|
"std.fs.Dir": 164,
|
|
"std.fs.File": 93,
|
|
"std.fs.cwd": 110,
|
|
"std.fs.openFileAbsolute": 10,
|
|
"std.log": 1,
|
|
"std.mem.indexOfAny(u8": 0,
|
|
"std.unicode": 27,
|
|
"undefined != ": 0,
|
|
"undefined == ": 0,
|
|
"usingnamespace": 0
|
|
} |