You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The specifics code probably doesn't matter though, the leak should be reported by testing.allocator with pretty much any net positive encode invocation:
[gpa] (err): Allocation size 106 bytes does not match free size 6. Allocation:
C:\dev\24-03\qrnl\src\codec\snappy\snappy.zig:427:34: 0x7ff6e29d789e in encode (test.exe.obj)
var dst = try allocator.alloc(u8, @as(usize, @intCast(encodedLen)));
^
C:\dev\24-03\qrnl\src\codec\snappy\test.zig:34:40: 0x7ff6e29dc1f2 in test.first snappy exec (test.exe.obj)
var buffout = try snappy.encode(alcr, buffin);
^
C:\Users\Aleksandar\AppData\Roaming\Code\User\globalStorage\ziglang.vscode-zig\zig_install\lib\test_runner.zig:100:29: 0x7ff6e29d5e41 in mainServer (test.exe.obj)
test_fn.func() catch |err| switch (err) {
^
C:\Users\Aleksandar\AppData\Roaming\Code\User\globalStorage\ziglang.vscode-zig\zig_install\lib\test_runner.zig:34:26: 0x7ff6e29d12cb in main (test.exe.obj)
return mainServer() catch @panic("internal test runner failure");
^
C:\Users\Aleksandar\AppData\Roaming\Code\User\globalStorage\ziglang.vscode-zig\zig_install\lib\std\start.zig:339:65: 0x7ff6e29d1053 in WinStartup (test.exe.obj)
std.os.windows.kernel32.ExitProcess(initEventLoopAndCallMain());
^
???:?:?: 0x7fffa2e4257c in ??? (KERNEL32.DLL)
???:?:?: 0x7fffa3e6aa57 in ??? (ntdll.dll)
Free:
C:\dev\24-03\qrnl\src\codec\snappy\test.zig:35:24: 0x7ff6e29dc301 in test.first snappy exec (test.exe.obj)
defer alcr.free(buffout);
^
C:\Users\Aleksandar\AppData\Roaming\Code\User\globalStorage\ziglang.vscode-zig\zig_install\lib\test_runner.zig:100:29: 0x7ff6e29d5e41 in mainServer (test.exe.obj)
test_fn.func() catch |err| switch (err) {
^
C:\Users\Aleksandar\AppData\Roaming\Code\User\globalStorage\ziglang.vscode-zig\zig_install\lib\test_runner.zig:34:26: 0x7ff6e29d12cb in main (test.exe.obj)
return mainServer() catch @panic("internal test runner failure");
^
C:\Users\Aleksandar\AppData\Roaming\Code\User\globalStorage\ziglang.vscode-zig\zig_install\lib\std\start.zig:339:65: 0x7ff6e29d1053 in WinStartup (test.exe.obj)
std.os.windows.kernel32.ExitProcess(initEventLoopAndCallMain());
^
???:?:?: 0x7fffa2e4257c in ??? (KERNEL32.DLL)
???:?:?: 0x7fffa3e6aa57 in ??? (ntdll.dll)
I'm also fairly new to zig and slowly trying to write a shitty parquet file reader. This seems to work for page decompression! I intend to at some point test if/how much using this and other pure zig codec implementations affects bundle size compared to using the C versions. I can share the results if you're curious.
The text was updated successfully, but these errors were encountered:
Thanks for finding this! I should have had a test to catch this earlier. I added one in and fixed it with your suggestion. We can leave this issue open if you'd like to share your results. It'd be interesting to see!
Caught in following test code:
The specifics code probably doesn't matter though, the leak should be reported by testing.allocator with pretty much any net positive encode invocation:
I'm also fairly new to zig and slowly trying to write a shitty parquet file reader. This seems to work for page decompression! I intend to at some point test if/how much using this and other pure zig codec implementations affects bundle size compared to using the C versions. I can share the results if you're curious.
The text was updated successfully, but these errors were encountered: