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

libcperciva import and fix lbs test #293

Merged
merged 4 commits into from
Jan 12, 2024
Merged

libcperciva import and fix lbs test #293

merged 4 commits into from
Jan 12, 2024

Commits on Jan 2, 2024

  1. elasticarray: fix unsigned arithmetic wrap around bug

    In the case of modulo wrapping of nsize * 4, the else if block could be
    taken even though EA->alloc is not really greater than nsize * 4.  This
    can lead to nalloc becoming smaller than nsize, which will result in the
    buffer to be reallocated to be smaller than the desired nsize.
    dorjoy03 authored and gperciva committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    fccd974 View commit details
    Browse the repository at this point in the history
  2. elasticarray: clarify unsigned arithmetic wrap around is handled

    This commit adds a comment describing the cases handled by the
    if (nalloc < nsize) block.  One such case is the potential wrap
    around of EA->alloc * 2.  Without the comment, it was not clear
    that the wrap around is properly handled.
    dorjoy03 authored and gperciva committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    895d657 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d45a22 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a1c7992 View commit details
    Browse the repository at this point in the history