authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-21 13:32:10 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-05-21 13:32:10 -07:00
logf87511611a32cbb063bd77e6cc9130965333a30d
tree2057d71a8b07276db0bfff9ee6fc60c5ac611aa9
parent662774eedca41771f9ebd1ab45cfdc8e4319d4b4

fix crash when name is longer than 255 bytes


1 files changed, 1 insertions(+), 1 deletions(-)

src/spall.zig+1-1
...@@ -48,7 +48,7 @@ pub inline fn trace_begin(ctx: tracer.Ctx, comptime ifmt: []const u8, iargs: any...@@ -48,7 +48,7 @@ pub inline fn trace_begin(ctx: tracer.Ctx, comptime ifmt: []const u8, iargs: any
48 .pid = @intCast(pid),48 .pid = @intCast(pid),
49 .tid = @intCast(tid),49 .tid = @intCast(tid),
50 .time = @floatFromInt(std.time.microTimestamp()),50 .time = @floatFromInt(std.time.microTimestamp()),
51 .name_len = @intCast(std.fmt.count(fmt, args ++ iargs)),51 .name_len = @truncate(std.fmt.count(fmt, args ++ iargs)),
52 .args_len = 0,52 .args_len = 0,
53 }) catch return;53 }) catch return;
54 buffered_writer.writer().print(fmt, args ++ iargs) catch return;54 buffered_writer.writer().print(fmt, args ++ iargs) catch return;