Hey there, I am back once again.
I am frustrated that I am reaching my debugging limits once again, but I have absolutely no clue why this error occurs.
For context, I am working on a library called zig-csv (https://distreat.github.io/zig-csv/#root;Table), which I am currently using to finish another project. The issue I am facing is that when running a certain snippet of code over and over then I am faced with the issue below.
I abstracted the code and managed to replicated the issue, which should mean this it is a problem within the library.
const std = @import("std");
const csv = @import("zig-csv");
const allocator = std.testing.allocator;
test "a" {
var table = csv.Table.init(allocator, csv.Settings.default());
defer table.deinit();
const col_index = try table.insertEmptyColumn("col1");
var i: usize = 0;
while (i <= 4) : (i += 1) { // works fine on less iterations, but at a certain threshold the error will occur
const row_index = try table.insertEmptyRow();
try table.replaceValue(row_index, col_index, "a" ** 500);
}
const exported = try table.exportCSV(allocator);
defer allocator.free(exported);
}
I'll post the traceback below, because of the character limit.
I appreciate everyones help and am just thankful for the help provided here.