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
Indexing into a slice relies on ptr::offset, which says that its UB to use an offset/index larger than isize::MAX. As documented by ptr::offset, "memory acquired directly from allocators or memory mapped files may be too large to handle with this function." Does that mean that e.g. memory mapping a file larger than isize::MAX into a slice is unsound, because safe code can cause UB just by indexing into it? Should the from_raw_parts docs tell callers that they need to check this?