Closed
Description
In contrast to all other tests, these three forget to call defer testing.allocator.free(actual);
:
zig/exercises/practice/all-your-base/test_all_your_base.zig
Lines 88 to 113 in f274768
This forces the solution to return a slice always referencing the same global array, which is incorrect because it can be modified hence cannot be guaranteed to be zero.
See for instance these solutions: mine, stgatilov, sezoka.
Some other solutions are even more broken because they return a slice referencing a local array (hence UB): Acaccia, mhennig4711.
Metadata
Metadata
Assignees
Labels
No labels