chung-leong / pb2zig

Pixel Bender to Zig code translator
MIT License
17 stars 1 forks source link

Out-of-bound panic in tests #36

Closed chung-leong closed 4 months ago

chung-leong commented 4 months ago

The following tests are affected:

thread 71766 panic: integer part of floating point value out of bounds
/home/cleong/pb2zig/pb2zig/test/zig-output/escherizer.zig:428:28: 0x7f1d0b4a20a6 in sampleNearest (escherizer)
            const x: i32 = @intFromFloat(coord[0]);
                           ^
/home/cleong/pb2zig/pb2zig/test/zig-output/escherizer.zig:137:45: 0x7f1d0b4665f4 in evaluatePixel (escherizer)
                self.dst = src.sampleNearest(@Vector(2, f32){ r1, r2 });
                                            ^
/home/cleong/pb2zig/pb2zig/test/zig-output/escherizer.zig:251:35: 0x7f1d0b41c494 in createPartialOutput (escherizer)
            instance.evaluatePixel();
                                  ^
/home/cleong/pb2zig/pb2zig/test/zig-output/escherizer.zig:228:31: 0x7f1d0b41c01e in createOutput (escherizer)
    return createPartialOutput(allocator, width, height, 0, height, input, params);
                              ^
/home/cleong/zigar/zigar-compiler/zig/exporter.zig:1861:22: 0x7f1d0b4a381d in tryFunction (escherizer)
            arg_ptr.*.retval = @call(.never_inline, function, args);
                     ^
/home/cleong/zigar/zigar-compiler/zig/exporter.zig:1867:24: 0x7f1d0b46959d in invokeFunction (escherizer)
            tryFunction(host, @ptrCast(@alignCast(arg_ptr))) catch |err| {
                       ^
/home/cleong/zigar/zigar-compiler/zig/exporter-c.zig:248:14: 0x7f1d0b409d31 in runThunk (escherizer)
    if (thunk(@ptrCast(call), args)) |result| {
             ^
???:?:?: 0x7f1facdd0078 in ??? (linux.x64.node)
Unwind information for `linux.x64.node:0x7f1facdd0078` was not available, trace may be incomplete

???:?:?: 0xf29f4e in ??? (???)
???:?:?: 0xf2a7bc in ??? (???)
???:?:?: 0xf2ac84 in ??? (???)
???:?:?: 0x1934df5 in ??? (???)
???:?:?: 0x7f1fe01b9b0a in ??? (???)
???:?:?: 0x7f1fe01b0df7 in ??? (???)
???:?:?: 0x7f1fe01b724a in ??? (???)
???:?:?: 0x18ded42 in ??? (???)
???:?:?: 0x1996bf0 in ??? (???)
???:?:?: 0x18cea33 in ??? (???)
???:?:?: 0x18a5002 in ??? (???)
???:?:?: 0x102282c in ??? (???)
???:?:?: 0x1023a5e in ??? (???)
???:?:?: 0x10573d5 in ??? (???)
???:?:?: 0x105776c in ??? (???)
???:?:?: 0xbb4bc7 in ??? (???)
???:?:?: 0xbb4e20 in ??? (???)
???:?:?: 0xc61763 in ??? (???)
../deps/uv/src/threadpool.c:329:5: 0x187ee9c in uv__work_done (../deps/uv/src/threadpool.c)
../deps/uv/src/unix/async.c:176:5: 0x18827f2 in uv__async_io (../deps/uv/src/unix/async.c)
../deps/uv/src/unix/linux.c:1476:11: 0x18971ba in uv__io_poll (../deps/uv/src/unix/linux.c)
../deps/uv/src/unix/core.c:447:5: 0x1883516 in uv_run (../deps/uv/src/unix/core.c)
???:?:?: 0xbb5b82 in ??? (???)
???:?:?: 0xced014 in ??? (???)
???:?:?: 0xced9dc in ??? (???)
???:?:?: 0xc588a6 in ??? (???)
Aborted (core dumped)