authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-09-12 03:15:12+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-09-30 13:44:53+01:00
logcf13b40946d5fbac1eb8963418a19b12a69023e8
treed025fc5e267bfdd231ef3536e3f1fab774b81954
parente6eccc3c8f075b6feed6e089564fd6495758dd9d
signaturelock-open Commit is signed but in an unrecognized format.

test-stack-traces: don't try to strip unwind tables on x86-windows


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

test/src/StackTrace.zig+4-1
......@@ -62,6 +62,8 @@ fn addCaseTarget(
6262
6363 // On aarch64-macos, FP unwinding is blessed by Apple to always be reliable, and std.debug knows this.
6464 const fp_unwind_is_safe = target.result.cpu.arch == .aarch64 and target.result.os.tag.isDarwin();
65 // On x86-windows, only FP unwinding is available.
66 const supports_unwind_tables = target.result.os.tag != .windows or target.result.cpu.arch != .x86;
6567
6668 const use_llvm_vals: []const bool = if (both_backends) &.{ true, false } else &.{true};
6769 const pie_vals: []const ?bool = if (both_pie) &.{ true, false } else &.{null};
......@@ -88,6 +90,7 @@ fn addCaseTarget(
8890 for (link_libc_vals) |link_libc| {
8991 for (strip_debug_vals) |strip_debug| {
9092 for (unwind_info_vals) |unwind_info| {
93 if (unwind_info.tables and !supports_unwind_tables) continue;
9194 self.addCaseInstance(
9295 target,
9396 triple,
......@@ -97,7 +100,7 @@ fn addCaseTarget(
97100 pie,
98101 link_libc,
99102 strip_debug,
100 !unwind_info.tables,
103 !unwind_info.tables and supports_unwind_tables,
101104 !unwind_info.fp,
102105 config.expect_panic,
103106 if (strip_debug) config.expect_strip else config.expect,