Skip to content

some 32-bit dynamic libc targets have started failing since the std.debug refactor #25520

@alexrp

Description

@alexrp

Since #25227, I'm seeing failure like this:

error: while executing test 'heap.test.StackFallbackAllocator', the following command terminated with signal 6 (expected exited with code 0):
qemu-mips -L /usr/local/lib/libc/mips-linux-gnu-soft ./.zig-cache/o/c8a2ce8e4173b29fd379a971471fe9c9/test --cache-dir=./.zig-cache --seed=0xbae0614b --listen=-
test-std
└─ run test std-mipsel-linux-musleabihf-mips32r2-Debug-libc-dynamic failure
Segmentation fault at address 0x2d8b0037
/home/alexrp/Source/ziglang/zig/lib/compiler_rt/memcpy.zig:170:17: 0x257032c in copyFixedLength (compiler_rt)
        d[i] = s[i];
                ^
/home/alexrp/Source/ziglang/zig/lib/std/posix/test.zig:353:31: 0x1d0eb0f in iter_fn (test)
        const phdr = info.phdr[i];
                              ^
/home/alexrp/Source/ziglang/zig/lib/std/posix.zig:5809:25: 0x1d0e86b in callbackC (test)
                callback(info, size, context_ptr.*) catch |err| return @intFromError(err);
                        ^
../ldso/dynlink.c:2413:9: 0x2d987fcf in dl_iterate_phdr (../ldso/dynlink.c)
/home/alexrp/Source/ziglang/zig/lib/std/posix.zig:5806:39: 0x1d0e56b in dl_iterate_phdr__anon_1300884 (test)
        switch (system.dl_iterate_phdr(struct {
                                      ^
/home/alexrp/Source/ziglang/zig/lib/std/posix/test.zig:376:30: 0x1d0e397 in test.dl_iterate_phdr (test)
    try posix.dl_iterate_phdr(&counter, IterFnError, iter_fn);
                             ^
/home/alexrp/Source/ziglang/zig/lib/compiler/test_runner.zig:138:29: 0x566c9b in mainServer (test)
                test_fn.func() catch |err| switch (err) {
                            ^
/home/alexrp/Source/ziglang/zig/lib/compiler/test_runner.zig:67:26: 0x56236f in main (test)
        return mainServer() catch @panic("internal test runner failure");
                         ^
/home/alexrp/Source/ziglang/zig/lib/std/start.zig:618:22: 0x56173b in callMain (test)
            root.main();
                     ^

Also hangs:

├─ [512/2931] run test std-mips-linux-musleabi-mips32r
│  └─ heap.test.StackFallbackAllocator
├─ [512/2933] run test std-x86-linux-musl-pentium4-Deb
│  └─ heap.test.StackFallbackAllocator
└─ [512/2933] run test std-mipsel-linux-musleabi-mips3
   └─ heap.test.StackFallbackAllocator

To reproduce:

  1. Build glibc and/or musl libcs: https://codeberg.org/ziglang/infra/src/branch/master/building-libcs.md
  2. zig build -fqemu --libc-runtimes $HOME/.local/libc test-std -Dtest-extra-targets -Dtest-target-filter=mips -Dtest-target-filter=x86-

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-mips32-bit and 64-bit MIPSarch-x8632-bit x86bugObserved behavior contradicts documented or intended behavioros-linuxregressionIt worked in a previous version of Zig, but stopped working.standard libraryThis issue involves writing Zig code for the standard library.upstreamAn issue with a third party project that Zig uses.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions