mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
Separates error return traces from stack traces
Doesn't commit the changes to stage1, we can generate those at the end once we're not making any more changes to it to avoid wasting storage.
This commit is contained in:
+1
-1
@@ -4900,7 +4900,7 @@ fn cmpxchgWeakButNotAtomic(comptime T: type, ptr: *T, expected_value: T, new_val
|
||||
{#header_close#}
|
||||
|
||||
{#header_open|@errorReturnTrace#}
|
||||
<pre>{#syntax#}@errorReturnTrace() ?*builtin.StackTrace{#endsyntax#}</pre>
|
||||
<pre>{#syntax#}@errorReturnTrace() ?*builtin.ErrorReturnTrace{#endsyntax#}</pre>
|
||||
<p>
|
||||
If the binary is built with error return tracing, and this function is invoked in a
|
||||
function that calls a function with an error or error union return type, returns a
|
||||
|
||||
@@ -40,7 +40,7 @@ pub const std_options: std.Options = .{
|
||||
.logFn = logFn,
|
||||
};
|
||||
|
||||
pub fn panic(msg: []const u8, st: ?*std.builtin.StackTrace, addr: ?usize) noreturn {
|
||||
pub fn panic(msg: []const u8, st: ?*std.debug.StackTrace, addr: ?usize) noreturn {
|
||||
_ = st;
|
||||
_ = addr;
|
||||
log.err("panic: {s}", .{msg});
|
||||
|
||||
@@ -33,7 +33,7 @@ pub const std_options: std.Options = .{
|
||||
//.log_level = .debug,
|
||||
};
|
||||
|
||||
pub fn panic(msg: []const u8, st: ?*std.builtin.StackTrace, addr: ?usize) noreturn {
|
||||
pub fn panic(msg: []const u8, st: ?*std.debug.StackTrace, addr: ?usize) noreturn {
|
||||
_ = st;
|
||||
_ = addr;
|
||||
log.err("panic: {s}", .{msg});
|
||||
|
||||
@@ -67,7 +67,7 @@ test_results: TestResults,
|
||||
|
||||
/// The return address associated with creation of this step that can be useful
|
||||
/// to print along with debugging messages.
|
||||
debug_stack_trace: std.builtin.StackTrace,
|
||||
debug_stack_trace: std.debug.StackTrace,
|
||||
|
||||
pub const TestResults = struct {
|
||||
/// The total number of tests in the step. Every test has a "status" from the following:
|
||||
|
||||
+1
-4
@@ -8,12 +8,9 @@ pub const assembly = @import("builtin/assembly.zig");
|
||||
|
||||
/// This data structure is used by the Zig language code generation and
|
||||
/// therefore must be kept in sync with the compiler implementation.
|
||||
pub const StackTrace = struct {
|
||||
pub const ErrorReturnTrace = struct {
|
||||
index: usize,
|
||||
instruction_addresses: []usize,
|
||||
/// Set to true if inlined frames are given their own entries in `instruction_addresses`,
|
||||
/// otherwise set to false.
|
||||
includes_inlined_frames: bool,
|
||||
};
|
||||
|
||||
/// This data structure is used by the Zig language code generation and
|
||||
|
||||
+36
-15
@@ -13,7 +13,6 @@ const windows = std.os.windows;
|
||||
const builtin = @import("builtin");
|
||||
const native_arch = builtin.cpu.arch;
|
||||
const native_os = builtin.os.tag;
|
||||
const StackTrace = std.builtin.StackTrace;
|
||||
|
||||
const root = @import("root");
|
||||
|
||||
@@ -568,7 +567,7 @@ pub fn defaultPanic(msg: []const u8, first_trace_addr: ?usize) noreturn {
|
||||
|
||||
if (@errorReturnTrace()) |t| if (t.index > 0) {
|
||||
writer.writeAll("error return context:\n") catch break :trace;
|
||||
writeStackTrace(t, stderr) catch break :trace;
|
||||
writeErrorReturnTrace(t, stderr) catch break :trace;
|
||||
writer.writeAll("\nstack trace:\n") catch break :trace;
|
||||
};
|
||||
writeCurrentStackTrace(.{
|
||||
@@ -607,6 +606,13 @@ fn waitForOtherThreadToFinishPanicking() void {
|
||||
}
|
||||
}
|
||||
|
||||
/// This data structure is used by the Zig language code generation and
|
||||
/// therefore must be kept in sync with the compiler implementation.
|
||||
pub const StackTrace = struct {
|
||||
index: usize,
|
||||
instruction_addresses: []usize,
|
||||
};
|
||||
|
||||
pub const StackUnwindOptions = struct {
|
||||
/// If not `null`, we will ignore all frames up until this return address. This is typically
|
||||
/// used to omit intermediate handling code (for instance, a panic handler and its machinery)
|
||||
@@ -629,7 +635,6 @@ pub noinline fn captureCurrentStackTrace(options: StackUnwindOptions, addr_buf:
|
||||
const empty_trace: StackTrace = .{
|
||||
.index = 0,
|
||||
.instruction_addresses = &.{},
|
||||
.includes_inlined_frames = false,
|
||||
};
|
||||
if (!std.options.allow_stack_tracing) return empty_trace;
|
||||
var it: StackIterator = .init(options.context);
|
||||
@@ -665,7 +670,6 @@ pub noinline fn captureCurrentStackTrace(options: StackUnwindOptions, addr_buf:
|
||||
return .{
|
||||
.index = index,
|
||||
.instruction_addresses = addr_buf[0..index],
|
||||
.includes_inlined_frames = false,
|
||||
};
|
||||
}
|
||||
/// Write the current stack trace to `writer`, annotated with source locations.
|
||||
@@ -752,7 +756,7 @@ pub noinline fn writeCurrentStackTrace(options: StackUnwindOptions, t: Io.Termin
|
||||
// Subtract 1 to get an address *in* the function call for a better source location.
|
||||
try printSourceAtAddress(io, di, t, .{
|
||||
.address = ret_addr -| StackIterator.ra_call_offset,
|
||||
.print_inlines = true,
|
||||
.resolve_inline_callers = true,
|
||||
});
|
||||
printed_any_frame = true;
|
||||
},
|
||||
@@ -786,8 +790,17 @@ pub const FormatStackTrace = struct {
|
||||
}
|
||||
};
|
||||
|
||||
/// Write a previously captured error return trace to `writer`, annotated with source locations.
|
||||
pub fn writeErrorReturnTrace(st: *const std.builtin.ErrorReturnTrace, t: Io.Terminal) Writer.Error!void {
|
||||
try writeTrace(st, t, false);
|
||||
}
|
||||
|
||||
/// Write a previously captured stack trace to `writer`, annotated with source locations.
|
||||
pub fn writeStackTrace(st: *const StackTrace, t: Io.Terminal) Writer.Error!void {
|
||||
pub fn writeStackTrace(et: *const StackTrace, t: Io.Terminal) Writer.Error!void {
|
||||
try writeTrace(et, t, true);
|
||||
}
|
||||
|
||||
fn writeTrace(trace: anytype, t: Io.Terminal, resolve_inline_callers: bool) Writer.Error!void {
|
||||
const writer = t.writer;
|
||||
if (!std.options.allow_stack_tracing) {
|
||||
t.setColor(.dim) catch {};
|
||||
@@ -796,9 +809,9 @@ pub fn writeStackTrace(st: *const StackTrace, t: Io.Terminal) Writer.Error!void
|
||||
return;
|
||||
}
|
||||
|
||||
// Fetch `st.index` straight away. Aside from avoiding redundant loads, this prevents issues if
|
||||
// `st` is `@errorReturnTrace()` and errors are encountered while writing the stack trace.
|
||||
const n_frames = st.index;
|
||||
// Fetch `trace.index` straight away. Aside from avoiding redundant loads, this prevents issues if
|
||||
// `trace` is `@errorReturnTrace()` and errors are encountered while writing the stack trace.
|
||||
const n_frames = trace.index;
|
||||
if (n_frames == 0) return writer.writeAll("(empty stack trace)\n");
|
||||
const di = getSelfDebugInfo() catch |err| switch (err) {
|
||||
error.UnsupportedTarget => {
|
||||
@@ -809,13 +822,13 @@ pub fn writeStackTrace(st: *const StackTrace, t: Io.Terminal) Writer.Error!void
|
||||
},
|
||||
};
|
||||
const io = std.Options.debug_io;
|
||||
const captured_frames = @min(n_frames, st.instruction_addresses.len);
|
||||
for (st.instruction_addresses[0..captured_frames]) |ret_addr| {
|
||||
const captured_frames = @min(n_frames, trace.instruction_addresses.len);
|
||||
for (trace.instruction_addresses[0..captured_frames]) |ret_addr| {
|
||||
// `ret_addr` is the return address, which is *after* the function call.
|
||||
// Subtract 1 to get an address *in* the function call for a better source location.
|
||||
try printSourceAtAddress(io, di, t, .{
|
||||
.address = ret_addr -| StackIterator.ra_call_offset,
|
||||
.print_inlines = !st.includes_inlined_frames,
|
||||
.resolve_inline_callers = resolve_inline_callers,
|
||||
});
|
||||
}
|
||||
if (n_frames > captured_frames) {
|
||||
@@ -833,6 +846,15 @@ pub fn dumpStackTrace(st: *const StackTrace) void {
|
||||
};
|
||||
}
|
||||
|
||||
/// A thin wrapper around `writeErrorReturnTrace` which writes to stderr and ignores write errors.
|
||||
pub fn dumpErrorReturnTrace(et: *const std.builtin.ErrorReturnTrace) void {
|
||||
const stderr = lockStderr(&.{}).terminal();
|
||||
defer unlockStderr();
|
||||
writeErrorReturnTrace(et, stderr) catch |err| switch (err) {
|
||||
error.WriteFailed => {},
|
||||
};
|
||||
}
|
||||
|
||||
const StackIterator = union(enum) {
|
||||
/// We will first report the current PC of this `CpuContextPtr`, then we will switch to a
|
||||
/// different strategy to actually unwind.
|
||||
@@ -1124,7 +1146,7 @@ pub inline fn stripInstructionPtrAuthCode(ptr: usize) usize {
|
||||
|
||||
const PrintSourceAddressOptions = struct {
|
||||
address: usize,
|
||||
print_inlines: bool,
|
||||
resolve_inline_callers: bool,
|
||||
};
|
||||
|
||||
fn printSourceAtAddress(
|
||||
@@ -1163,7 +1185,7 @@ fn printSourceAtAddress(
|
||||
symbol.name orelse "???",
|
||||
symbol.compile_unit_name orelse debug_info.getModuleName(io, options.address) catch "???",
|
||||
);
|
||||
if (!options.print_inlines) break;
|
||||
if (!options.resolve_inline_callers) break;
|
||||
}
|
||||
}
|
||||
fn printLineInfo(
|
||||
@@ -1708,7 +1730,6 @@ pub fn ConfigurableTrace(comptime size: usize, comptime stack_frame_count: usize
|
||||
const stack_trace: StackTrace = .{
|
||||
.index = frames.len,
|
||||
.instruction_addresses = frames,
|
||||
.includes_inlined_frames = false,
|
||||
};
|
||||
writeStackTrace(&stack_trace, stderr) catch return;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
//! Resizing and remapping are forwarded directly to the backing allocator,
|
||||
//! except where such operations would change the category from large to small.
|
||||
const builtin = @import("builtin");
|
||||
const StackTrace = std.builtin.StackTrace;
|
||||
const StackTrace = std.debug.StackTrace;
|
||||
|
||||
const std = @import("std");
|
||||
const log = std.log.scoped(.DebugAllocator);
|
||||
@@ -229,7 +229,7 @@ pub fn DebugAllocator(comptime config: Config) type {
|
||||
std.debug.dumpStackTrace(self.getStackTrace(trace_kind));
|
||||
}
|
||||
|
||||
fn getStackTrace(self: *LargeAlloc, trace_kind: TraceKind) std.builtin.StackTrace {
|
||||
fn getStackTrace(self: *LargeAlloc, trace_kind: TraceKind) std.debug.StackTrace {
|
||||
assert(@intFromEnum(trace_kind) < trace_n);
|
||||
const stack_addresses = &self.stack_addresses[@intFromEnum(trace_kind)];
|
||||
var len: usize = 0;
|
||||
@@ -239,7 +239,6 @@ pub fn DebugAllocator(comptime config: Config) type {
|
||||
return .{
|
||||
.instruction_addresses = stack_addresses,
|
||||
.index = len,
|
||||
.includes_inlined_frames = false,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -342,7 +341,6 @@ pub fn DebugAllocator(comptime config: Config) type {
|
||||
return .{
|
||||
.instruction_addresses = stack_addresses,
|
||||
.index = len,
|
||||
.includes_inlined_frames = false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -761,7 +761,7 @@ inline fn wrapMain(result: anytype) u8 {
|
||||
std.log.err("{t}", .{err});
|
||||
switch (native_os) {
|
||||
.freestanding, .other => {},
|
||||
else => if (@errorReturnTrace()) |trace| std.debug.dumpStackTrace(trace),
|
||||
else => if (@errorReturnTrace()) |trace| std.debug.dumpErrorReturnTrace(trace),
|
||||
}
|
||||
return 1;
|
||||
};
|
||||
|
||||
@@ -131,7 +131,7 @@ fn free(
|
||||
}
|
||||
|
||||
/// Only valid once `has_induced_failure == true`
|
||||
pub fn getStackTrace(self: *FailingAllocator) std.builtin.StackTrace {
|
||||
pub fn getStackTrace(self: *FailingAllocator) std.debug.StackTrace {
|
||||
std.debug.assert(self.has_induced_failure);
|
||||
var len: usize = 0;
|
||||
while (len < self.stack_addresses.len and self.stack_addresses[len] != 0) {
|
||||
|
||||
+22
-23
@@ -2252,9 +2252,8 @@ pub fn setupErrorReturnTrace(sema: *Sema, block: *Block, last_arg_index: usize)
|
||||
});
|
||||
const addrs_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(addr_arr_ty));
|
||||
|
||||
// var st: StackTrace = undefined;
|
||||
const stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace);
|
||||
const st_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(stack_trace_ty));
|
||||
const error_return_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .ErrorReturnTrace);
|
||||
const st_ptr = try err_trace_block.addTy(.alloc, try pt.singleMutPtrType(error_return_trace_ty));
|
||||
|
||||
// st.instruction_addresses = &addrs;
|
||||
const instruction_addresses_field_name = try ip.getOrPutString(gpa, io, pt.tid, "instruction_addresses", .no_embedded_nulls);
|
||||
@@ -6166,10 +6165,10 @@ pub fn analyzeSaveErrRetIndex(sema: *Sema, block: *Block) SemaError!Air.Inst.Ref
|
||||
|
||||
if (!block.ownerModule().error_tracing) return .none;
|
||||
|
||||
const stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace);
|
||||
const error_return_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .ErrorReturnTrace);
|
||||
const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
|
||||
const field_index = sema.structFieldIndex(block, stack_trace_ty, field_name, LazySrcLoc.unneeded) catch |err| switch (err) {
|
||||
error.AnalysisFail => @panic("std.builtin.StackTrace is corrupt"),
|
||||
const field_index = sema.structFieldIndex(block, error_return_trace_ty, field_name, LazySrcLoc.unneeded) catch |err| switch (err) {
|
||||
error.AnalysisFail => @panic("std.builtin.ErrorReturnTrace is corrupt"),
|
||||
error.ComptimeReturn, error.ComptimeBreak => unreachable,
|
||||
error.OutOfMemory, error.Canceled => |e| return e,
|
||||
};
|
||||
@@ -6177,7 +6176,7 @@ pub fn analyzeSaveErrRetIndex(sema: *Sema, block: *Block) SemaError!Air.Inst.Ref
|
||||
return try block.addInst(.{
|
||||
.tag = .save_err_return_trace_index,
|
||||
.data = .{ .ty_pl = .{
|
||||
.ty = Air.internedToRef(stack_trace_ty.toIntern()),
|
||||
.ty = Air.internedToRef(error_return_trace_ty.toIntern()),
|
||||
.payload = @intCast(field_index),
|
||||
} },
|
||||
});
|
||||
@@ -6209,11 +6208,11 @@ fn popErrorReturnTrace(
|
||||
// AstGen determined this result does not go to an error-handling expr (try/catch/return etc.), or
|
||||
// the result is comptime-known to be a non-error. Either way, pop unconditionally.
|
||||
|
||||
const stack_trace_ty = try sema.getBuiltinType(src, .StackTrace);
|
||||
const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
|
||||
const err_return_trace = try block.addTy(.err_return_trace, ptr_stack_trace_ty);
|
||||
const error_return_trace_ty = try sema.getBuiltinType(src, .ErrorReturnTrace);
|
||||
const ptr_error_return_trace_ty = try pt.singleMutPtrType(error_return_trace_ty);
|
||||
const err_return_trace = try block.addTy(.err_return_trace, ptr_error_return_trace_ty);
|
||||
const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
|
||||
const field_ptr = try sema.structFieldPtr(block, src, err_return_trace, field_name, src, stack_trace_ty);
|
||||
const field_ptr = try sema.structFieldPtr(block, src, err_return_trace, field_name, src, error_return_trace_ty);
|
||||
try sema.storePtr2(block, src, field_ptr, src, saved_error_trace_index, src, .store);
|
||||
} else if (is_non_error == null) {
|
||||
// The result might be an error. If it is, we leave the error trace alone. If it isn't, we need
|
||||
@@ -6234,11 +6233,11 @@ fn popErrorReturnTrace(
|
||||
defer then_block.instructions.deinit(gpa);
|
||||
|
||||
// If non-error, then pop the error return trace by restoring the index.
|
||||
const stack_trace_ty = try sema.getBuiltinType(src, .StackTrace);
|
||||
const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
|
||||
const err_return_trace = try then_block.addTy(.err_return_trace, ptr_stack_trace_ty);
|
||||
const error_return_trace_ty = try sema.getBuiltinType(src, .ErrorReturnTrace);
|
||||
const ptr_error_return_trace_ty = try pt.singleMutPtrType(error_return_trace_ty);
|
||||
const err_return_trace = try then_block.addTy(.err_return_trace, ptr_error_return_trace_ty);
|
||||
const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
|
||||
const field_ptr = try sema.structFieldPtr(&then_block, src, err_return_trace, field_name, src, stack_trace_ty);
|
||||
const field_ptr = try sema.structFieldPtr(&then_block, src, err_return_trace, field_name, src, error_return_trace_ty);
|
||||
try sema.storePtr2(&then_block, src, field_ptr, src, saved_error_trace_index, src, .store);
|
||||
_ = try then_block.addBr(cond_block_inst, .void_value);
|
||||
|
||||
@@ -6373,15 +6372,15 @@ fn zirCall(
|
||||
// If any input is an error-type, we might need to pop any trace it generated. Otherwise, we only
|
||||
// need to clean-up our own trace if we were passed to a non-error-handling expression.
|
||||
if (input_is_error or (pop_error_return_trace and return_ty.isError(zcu))) {
|
||||
const stack_trace_ty = try sema.getBuiltinType(call_src, .StackTrace);
|
||||
const error_return_trace_ty = try sema.getBuiltinType(call_src, .ErrorReturnTrace);
|
||||
const field_name = try zcu.intern_pool.getOrPutString(gpa, io, pt.tid, "index", .no_embedded_nulls);
|
||||
const field_index = try sema.structFieldIndex(block, stack_trace_ty, field_name, call_src);
|
||||
const field_index = try sema.structFieldIndex(block, error_return_trace_ty, field_name, call_src);
|
||||
|
||||
// Insert a save instruction before the arg resolution + call instructions we just generated
|
||||
const save_inst = try block.insertInst(block_index, .{
|
||||
.tag = .save_err_return_trace_index,
|
||||
.data = .{ .ty_pl = .{
|
||||
.ty = Air.internedToRef(stack_trace_ty.toIntern()),
|
||||
.ty = Air.internedToRef(error_return_trace_ty.toIntern()),
|
||||
.payload = @intCast(field_index),
|
||||
} },
|
||||
});
|
||||
@@ -19529,13 +19528,13 @@ fn getErrorReturnTrace(sema: *Sema, block: *Block) CompileError!Air.Inst.Ref {
|
||||
const pt = sema.pt;
|
||||
const zcu = pt.zcu;
|
||||
const ip = &zcu.intern_pool;
|
||||
const stack_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .StackTrace);
|
||||
const ptr_stack_trace_ty = try pt.singleMutPtrType(stack_trace_ty);
|
||||
const opt_ptr_stack_trace_ty = try pt.optionalType(ptr_stack_trace_ty.toIntern());
|
||||
const error_return_trace_ty = try sema.getBuiltinType(block.nodeOffset(.zero), .ErrorReturnTrace);
|
||||
const ptr_error_return_trace_ty = try pt.singleMutPtrType(error_return_trace_ty);
|
||||
const opt_ptr_error_return_trace_ty = try pt.optionalType(ptr_error_return_trace_ty.toIntern());
|
||||
|
||||
switch (sema.owner.unwrap()) {
|
||||
.func => |func| if (ip.funcAnalysisUnordered(func).has_error_trace and block.ownerModule().error_tracing) {
|
||||
return block.addTy(.err_return_trace, opt_ptr_stack_trace_ty);
|
||||
return block.addTy(.err_return_trace, opt_ptr_error_return_trace_ty);
|
||||
},
|
||||
|
||||
.@"comptime",
|
||||
@@ -19547,7 +19546,7 @@ fn getErrorReturnTrace(sema: *Sema, block: *Block) CompileError!Air.Inst.Ref {
|
||||
=> {},
|
||||
}
|
||||
return Air.internedToRef(try pt.intern(.{ .opt = .{
|
||||
.ty = opt_ptr_stack_trace_ty.toIntern(),
|
||||
.ty = opt_ptr_error_return_trace_ty.toIntern(),
|
||||
.val = .none,
|
||||
} }));
|
||||
}
|
||||
|
||||
+2
-2
@@ -434,7 +434,7 @@ pub const BuiltinDecl = enum {
|
||||
AddressSpace,
|
||||
CallingConvention,
|
||||
returnError,
|
||||
StackTrace,
|
||||
ErrorReturnTrace,
|
||||
SourceLocation,
|
||||
CallModifier,
|
||||
AtomicOrder,
|
||||
@@ -512,7 +512,7 @@ pub const BuiltinDecl = enum {
|
||||
return switch (decl) {
|
||||
.returnError => .func,
|
||||
|
||||
.StackTrace,
|
||||
.ErrorReturnTrace,
|
||||
.CallingConvention,
|
||||
.SourceLocation,
|
||||
.Signedness,
|
||||
|
||||
@@ -3374,7 +3374,7 @@ pub const Object = struct {
|
||||
}
|
||||
|
||||
if (fn_info.cc == .auto and zcu.comp.config.any_error_tracing) {
|
||||
// First parameter is a pointer to `std.builtin.StackTrace`.
|
||||
// First parameter is a pointer to `std.builtin.ErrorReturnTrace`.
|
||||
const llvm_ptr_ty = try o.builder.ptrType(toLlvmAddressSpace(.generic, target));
|
||||
try llvm_params.append(o.gpa, llvm_ptr_ty);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export fn foo() void {
|
||||
@panic("oh no");
|
||||
}
|
||||
|
||||
pub fn panic(_: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(_: []const u8, _: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
@compileError("panic");
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn main() !void {
|
||||
|
||||
try stdout.interface.flush();
|
||||
}
|
||||
fn foo(w: *std.Io.Writer, st_buf: []usize) !std.builtin.StackTrace {
|
||||
fn foo(w: *std.Io.Writer, st_buf: []usize) !std.debug.StackTrace {
|
||||
try std.debug.writeCurrentStackTrace(.{}, .{ .writer = w, .mode = .no_color });
|
||||
return std.debug.captureCurrentStackTrace(.{}, st_buf);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "incorrect alignment")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "invalid enum value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, _: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
if (std.mem.eql(u8, message, "invalid enum value")) {
|
||||
std.process.exit(0);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, _: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
if (std.mem.eql(u8, message, "invalid enum value")) {
|
||||
std.process.exit(0);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "invalid error code")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "invalid error code")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer does not fit in destination type")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const std = @import("std");
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer part of floating point value out of bounds")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "cast causes pointer to be null")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "cast causes pointer to be null")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "incorrect alignment")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "invalid enum value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "invalid enum value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "sentinel mismatch: expected { 0, 0 }, found { 4, 4 }")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "sentinel mismatch: expected 0, found 4")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "access of union field 'float' while field 'int' is active")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "oh no")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "exact division produced remainder")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "invalid error code")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "index out of bounds: index 1, len 0")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "exact division produced remainder")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "exact division produced remainder")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "for loop over objects with non-equal lengths")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "for loop over objects with non-equal lengths")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "division by zero")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "division by zero")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "@memcpy arguments alias")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "source and destination arguments have non-equal lengths")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "source and destination arguments have non-equal lengths")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "division by zero")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "division by zero")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "'noreturn' function returned")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "attempt to use null value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "attempt to use null value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, ra: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, ra: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
_ = ra;
|
||||
if (std.mem.eql(u8, message, "attempt to use null value")) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "index out of bounds: index 16, len 5")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "index out of bounds: index 4, len 4")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "cast causes pointer to be null")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "cast causes pointer to be null")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "sentinel mismatch: expected 0, found 4")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "division by zero")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "shift amount is greater than the type size")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "shift amount is greater than the type size")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer overflow")) {
|
||||
std.process.exit(0);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer does not fit in destination type")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer does not fit in destination type")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "left shift overflowed bits")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "right shift overflowed bits")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "integer does not fit in destination type")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "sentinel mismatch: expected 1, found 3")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "sentinel mismatch: expected 1, found 0")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "sentinel mismatch: expected 1.2, found 4")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "sentinel mismatch: expected null, found i32@10")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "sentinel mismatch: expected 0, found 4")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "start index 10 is larger than end index 1")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "index out of bounds: index 5, len 4")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "index out of bounds: index 5, len 4")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn main() void {
|
||||
std.process.exit(1);
|
||||
}
|
||||
|
||||
pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, _: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
if (std.mem.eql(u8, message, "slice length '3' does not divide exactly into destination elements")) {
|
||||
std.process.exit(0);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn main() void {
|
||||
std.process.exit(1);
|
||||
}
|
||||
|
||||
pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, _: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
if (std.mem.eql(u8, message, "slice length '1' does not divide exactly into destination elements")) {
|
||||
std.process.exit(0);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ pub fn main() void {
|
||||
std.process.exit(1);
|
||||
}
|
||||
|
||||
pub fn panic(message: []const u8, _: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, _: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
if (std.mem.eql(u8, message, "slice length '1' does not divide exactly into destination elements")) {
|
||||
std.process.exit(0);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "attempt to use null value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "attempt to use null value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "switch on corrupt value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const std = @import("std");
|
||||
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.builtin.StackTrace, _: ?usize) noreturn {
|
||||
pub fn panic(message: []const u8, stack_trace: ?*std.debug.StackTrace, _: ?usize) noreturn {
|
||||
_ = stack_trace;
|
||||
if (std.mem.eql(u8, message, "switch on corrupt value")) {
|
||||
std.process.exit(0);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user