#Allocation does not match resize (gpa)
1 messages ยท Page 1 of 1 (latest)
the only way i could recreate this was by setting the capacity of the list explicitly list.capacity = 1; which you shouldnt do
ArrayList(u8)
I am
pretty sure I dont do that
could you maybe send your code?
Of course
In case you don't have enough time to debug this, could you point me to any resources when it comes to Zig debugging?
i commented out a lot of stuff so it would work on windows and i didnt seem to get that bug
(didnt comment out the actual buggy part, just the linux specific parts)
valgrind might help? i couldnt tell you though, im sorry ๐
I don't get it immediately
I have to type 12
Thanks for trying, though ๐
oh i got it too, ill look into it more then
ah youre only appending numbers, i should have noticed that ๐
It's hard to see stuff like that immediately haha
oh it might be 385:
config.code = syntax.create(partial.plaintext.items, null, null);
youre passing only part of an owned slice, items isnt the entire allocated slice, its just the part thats populated. changing it to:
config.code = syntax.create(partial.plaintext.toOwnedSlice() catch unreachable, null, null);
fixes it for me
Why is it a problem that I'm passing only a part of an owned slice?