You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has historically being a possible unchecked OOB access if a user made a vector and pushed/popped/sizehinted it while keeping a view into the array. Views do not do a double boundscheck (one on the view and one on the array), instead they boundscheck on their bounds and perform a check during view construction that all of their indices are valid. Before we had array this was an issue with no clean solution, we either do the double boundscheck or have what we have right now which is potential OOB. With Memory we can have the view ignore the array and turn that OOB/UB into defined code, because Memory bounds nevert change. This has a caveat that it now means if someone pushes/pops that vector while keeping a view, the view may no longer alias the array.
The text was updated successfully, but these errors were encountered:
This has historically being a possible unchecked OOB access if a user made a vector and pushed/popped/sizehinted it while keeping a view into the array. Views do not do a double boundscheck (one on the view and one on the array), instead they boundscheck on their bounds and perform a check during view construction that all of their indices are valid. Before we had array this was an issue with no clean solution, we either do the double boundscheck or have what we have right now which is potential OOB. With Memory we can have the view ignore the array and turn that OOB/UB into defined code, because Memory bounds nevert change. This has a caveat that it now means if someone pushes/pops that vector while keeping a view, the view may no longer alias the array.
The text was updated successfully, but these errors were encountered: