zig icon indicating copy to clipboard operation
zig copied to clipboard

libstd tests causes aarch64-windows panic with HeapAllocator

Open kubkon opened this issue 3 years ago • 0 comments

Zig Version

0.11.0-dev.371+9d0ea0e3f

Steps to Reproduce and Observed Behavior

Test [18/1557] test.shl... SKIP
Test [19/1557] test.shr... SKIP
Test [20/1557] test.rotr... SKIP
Test [21/1557] test.rotl... SKIP
Test [47/1557] test.sign... SKIP
Test [82/1557] test.basic functionality... SKIP
Test [101/1557] test.HeapAllocator... thread 14652 panic: reached unreachable code
C:\Users\kubko\dev\zig\lib\std\mem\Allocator.zig:734:86: 0x7ff7d09cd2b3 in shrinkBytes (test.exe.obj)
    return self.rawResize(buf, buf_align, new_len, len_align, return_address) orelse unreachable;
                                                                                     ^
C:\Users\kubko\dev\zig\lib\std\mem\Allocator.zig:481:47: 0x7ff7d089f2df in alignedShrinkWithRetAddr__anon_21410 (test.exe.obj)
    _ = self.shrinkBytes(old_byte_slice, Slice.alignment, byte_count, 0, return_address);
                                              ^
C:\Users\kubko\dev\zig\lib\std\mem\Allocator.zig:435:41: 0x7ff7d06f99a3 in shrink__anon_13243 (test.exe.obj)
    return self.alignedShrinkWithRetAddr(old_mem, old_alignment, new_n, @returnAddress());
                                        ^
C:\Users\kubko\dev\zig\lib\std\heap.zig:1172:33: 0x7ff7d06f800b in testAllocatorAligned (test.exe.obj)
        slice = allocator.shrink(slice, 10);
                                ^
C:\Users\kubko\dev\zig\lib\std\heap.zig:1013:33: 0x7ff7d06fb5cb in test.HeapAllocator (test.exe.obj)
        try testAllocatorAligned(allocator);
                                ^
C:\Users\kubko\dev\zig\lib\test_runner.zig:63:28: 0x7ff7d06a16b7 in main (test.exe.obj)
        } else test_fn.func();
                           ^
C:\Users\kubko\dev\zig\lib\std\start.zig:385:41: 0x7ff7d06a1347 in WinStartup (test.exe.obj)
    std.debug.maybeEnableSegfaultHandler();
                                        ^
???:?:?: 0x7ffdd8e2201f in ??? (???)
???:?:?: 0x7ffdda602deb in ??? (???)
error: the following test command failed with exit code 3:
C:\Users\kubko\dev\zig\zig-cache\o\d675e45bc036ec0dbd7cbe26edf73177\test.exe

Expected Behavior

Tests should not crash.

kubkon avatar Nov 29 '22 19:11 kubkon