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

refactor(rust): Fencepost error in debug assertion in splitfields #18423

Merged
merged 2 commits into from
Aug 28, 2024

Commits on Aug 28, 2024

  1. Tighten unsafe block

    wence- committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    0cbbfcd View commit details
    Browse the repository at this point in the history
  2. refactor(rust): Fix fencepost debug assertion in splitfields

    For some slice `v` of length `n`, it is UB to call `get_unchecked`
    with a range starting at `n+1`. Previously, we asserted that `pos <=
    n`, which is the requirement for `v.get_unchecked(..pos)`, but not
    `v.get_unchecked(pos+1..)` which has the tighter requirement `pos <
    n`.
    wence- committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    17ac49a View commit details
    Browse the repository at this point in the history