Skip to content

debug: stack capturing now fails in x32 abi executables #25447

@jacobly0

Description

@jacobly0
const std = @import("std");
pub fn main() void {
    var addrs: [0]usize = undefined;
    _ = std.debug.captureCurrentStackTrace(.{}, &addrs);
}
$ zig run repro.zig -target x86_64-linux-muslx32 -lc
thread 732695 panic: attempt to unwrap error: IncompatibleRegisterSize
error return context:
lib/std/debug/Dwarf/SelfUnwinder.zig:315:38: 0x4fb50 in regNative (repro)
    if (bytes.len != @sizeOf(usize)) return error.IncompatibleRegisterSize;
                                     ^

stack trace:
aborting due to recursive panic
Aborted                    (core dumped) zig run repro.zig -target x86_64-linux-muslx32 -lc

Metadata

Metadata

Assignees

No one assigned

    Labels

    abi-n32The N32 ABI for 64-bit MIPSabi-x32The x32 ABI for 64-bit x86arch-mips6464-bit MIPSarch-x86_6464-bit x86bugObserved behavior contradicts documented or intended behaviorregressionIt worked in a previous version of Zig, but stopped working.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions