zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 30f5258fe60cd5209fdfb44bd060f36435cb47b0 (tree)
parent 906ce2ad7cb3960eb579ab46b79dff3b9eae1ef5
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Fri,  3 Oct 2025 18:02:56 +0200

std.debug.SelfInfo.Elf: disable unwinding on mips n32 and x86 x32

The DWARF code can't handle these yet.

ref https://github.com/ziglang/zig/issues/25447

Diffstat:
Mlib/std/debug/SelfInfo/Elf.zig | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/lib/std/debug/SelfInfo/Elf.zig b/lib/std/debug/SelfInfo/Elf.zig @@ -81,6 +81,16 @@ pub fn getModuleName(si: *SelfInfo, gpa: Allocator, address: usize) Error![]cons } pub const can_unwind: bool = s: { + // The DWARF code can't deal with ILP32 ABIs yet: https://github.com/ziglang/zig/issues/25447 + switch (builtin.target.abi) { + .gnuabin32, + .muslabin32, + .gnux32, + .muslx32, + => break :s false, + else => {}, + } + // Notably, we are yet to support unwinding on ARM. There, unwinding is not done through // `.eh_frame`, but instead with the `.ARM.exidx` section, which has a different format. const archs: []const std.Target.Cpu.Arch = switch (builtin.target.os.tag) {