Closed MRDGH2821 closed 4 months ago
Debug build stack trace:
bun-debug wat.js
============================================================
Bun v1.1.9 (ff1db36a) macOS Silicon
Args: "bun-debug", "wat.js"
Features: jsc Bun.stderr Bun.stdout bunfig shell
Builtins: "bun:main"
Elapsed: 59ms | User: 42ms | Sys: 46ms
RSS: 66.81MB | Peak: 66.81MB | Commit: 1.07GB | Faults: 64
panic(main thread): reached unreachable code
/Users/jarred/Code/bun/src/bun.zig:3196:43: 0x104b2ea97 in assert (bun-zig)
if (comptime Environment.isDebug) unreachable;
^
/Users/jarred/Code/bun/src/bun.zig:391:50: 0x104b88a03 in copy__anon_54511 (bun-zig)
if (comptime Environment.allow_assert) assert(dest.len >= src.len);
^
/Users/jarred/Code/bun/src/which.zig:8:13: 0x1050eef2f in isValid (bun-zig)
bun.copy(u8, buf[segment.len + 1 ..], bin);
^
/Users/jarred/Code/bun/src/which.zig:57:20: 0x104ce523b in which (bun-zig)
if (isValid(buf, segment, bin)) |len| {
^
/Users/jarred/Code/bun/src/shell/interpreter.zig:4624:39: 0x10692fc1f in initSubproc (bun-zig)
const resolved = which(&path_buf, spawn_args.PATH, spawn_args.cwd, first_arg_real) orelse blk: {
^
/Users/jarred/Code/bun/src/shell/interpreter.zig:4495:29: 0x1064ed513 in transitionToExecStateAndYield (bun-zig)
this.initSubproc();
^
/Users/jarred/Code/bun/src/shell/interpreter.zig:4449:63: 0x10605b98b in next (bun-zig)
this.transitionToExecStateAndYield();
^
/Users/jarred/Code/bun/src/shell/interpreter.zig:4547:26: 0x106964baf in childDone (bun-zig)
this.next();
^
/Users/jarred/Code/bun/src/shell/interpreter.zig:11689:37: 0x1065538cb in childDone__anon_298706 (bun-zig)
casted.childDone(child_ptr, exit_code);
^
/Users/jarred/Code/bun/src/shell/interpreter.zig:1916:38: 0x1060c6feb in next (bun-zig)
this.parent.childDone(this, 0);
^
fish: Job 1, 'bun-debug wat.js' terminated by signal SIGTRAP (Trace or breakpoint trap)
@paperdave: note how the reported stacktrace here shows URLParser but the actual bug is not related to the URL parser
How can we reproduce the crash?
JavaScript/TypeScript code that reproduces the crash?
Relevant log output
Stack Trace (bun.report)
Bun v1.1.8 (
89d2580
) on linux x86_64_baseline [AutoCommand]Segmentation fault at address 0x00000000
ld-temp.o:0
:void WTF::URLParser::parse<char16_t>
??