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(...@@ -62,6 +62,8 @@ fn addCaseTarget(
6262
63 // On aarch64-macos, FP unwinding is blessed by Apple to always be reliable, and std.debug knows this.63 // On aarch64-macos, FP unwinding is blessed by Apple to always be reliable, and std.debug knows this.
64 const fp_unwind_is_safe = target.result.cpu.arch == .aarch64 and target.result.os.tag.isDarwin();64 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
66 const use_llvm_vals: []const bool = if (both_backends) &.{ true, false } else &.{true};68 const use_llvm_vals: []const bool = if (both_backends) &.{ true, false } else &.{true};
67 const pie_vals: []const ?bool = if (both_pie) &.{ true, false } else &.{null};69 const pie_vals: []const ?bool = if (both_pie) &.{ true, false } else &.{null};
...@@ -88,6 +90,7 @@ fn addCaseTarget(...@@ -88,6 +90,7 @@ fn addCaseTarget(
88 for (link_libc_vals) |link_libc| {90 for (link_libc_vals) |link_libc| {
89 for (strip_debug_vals) |strip_debug| {91 for (strip_debug_vals) |strip_debug| {
90 for (unwind_info_vals) |unwind_info| {92 for (unwind_info_vals) |unwind_info| {
93 if (unwind_info.tables and !supports_unwind_tables) continue;
91 self.addCaseInstance(94 self.addCaseInstance(
92 target,95 target,
93 triple,96 triple,
...@@ -97,7 +100,7 @@ fn addCaseTarget(...@@ -97,7 +100,7 @@ fn addCaseTarget(
97 pie,100 pie,
98 link_libc,101 link_libc,
99 strip_debug,102 strip_debug,
100 !unwind_info.tables,103 !unwind_info.tables and supports_unwind_tables,
101 !unwind_info.fp,104 !unwind_info.fp,
102 config.expect_panic,105 config.expect_panic,
103 if (strip_debug) config.expect_strip else config.expect,106 if (strip_debug) config.expect_strip else config.expect,