From d8d0a3e5c77ccce33699d6c11a850d383a83c40d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 3 Sep 2025 11:23:44 +0200 Subject: [PATCH 1/2] std.debug: disable stack traces on loongarch Observed to ~randomly crash during FP-based unwinding. The path forward here will be DWARF-based unwinding. --- lib/std/debug.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 1ec1ca1e8a..18b1568b19 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -169,6 +169,8 @@ pub const runtime_safety = switch (builtin.mode) { pub const sys_can_stack_trace = switch (builtin.cpu.arch) { // Observed to go into an infinite loop. // TODO: Make this work. + .loongarch32, + .loongarch64, .mips, .mipsel, .mips64, From b2ef6d01fff852f2f1b24bba4917055f4e699f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 3 Sep 2025 11:26:55 +0200 Subject: [PATCH 2/2] Revert "test: disable non-native loongarch64 behavior and std tests" This reverts commit f4ed35f800396f12c7cd6aa1f70cf2555ddf7c84. This should no longer be needed now that stack traces are disabled on loongarch. closes #24405 --- test/tests.zig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/tests.zig b/test/tests.zig index ef96a662fb..44c2d11e4e 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -2293,11 +2293,6 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { if (options.skip_single_threaded and test_target.single_threaded == true) continue; - // https://github.com/ziglang/zig/issues/24405 - if (!builtin.cpu.arch.isLoongArch() and target.cpu.arch.isLoongArch() and - (mem.eql(u8, options.name, "behavior") or mem.eql(u8, options.name, "std"))) - continue; - // TODO get compiler-rt tests passing for self-hosted backends. if (((target.cpu.arch != .x86_64 and target.cpu.arch != .aarch64) or target.ofmt == .coff) and test_target.use_llvm == false and mem.eql(u8, options.name, "compiler-rt"))