Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercises(all-your-base): add missing frees #317

Merged
merged 3 commits into from
Sep 12, 2023
Merged

Commits on Sep 12, 2023

  1. test_all_your_base.zig memory leak fix

    The comment in user code says:
      /// Caller owns the returned memory.
    However, the testing code does not free returned memory if the answer is zero = {0}. As the result, users get memory leaks with wrong code due to testing code breaking the contract.
    Some awful hacks are necessary to workaround it.
    stgatilov authored Sep 12, 2023
    Configuration menu
    Copy the full SHA
    17597d9 View commit details
    Browse the repository at this point in the history
  2. exercises(all-your-base): example: make zero array global

    Fix returning reference to invalid memory.
    ee7 committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    d02cbfb View commit details
    Browse the repository at this point in the history
  3. exercises(all-your-base): example: put {0} on heap

    Fix "invalid free" errors.
    ee7 committed Sep 12, 2023
    Configuration menu
    Copy the full SHA
    4f851db View commit details
    Browse the repository at this point in the history