Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tokio: check page capacity before obtaining base pointer (#4731)
This doesn't cause any issues in practice because this is a private API that is only used in ways that cannot trigger UB. Indexing into `slots` is not sound until after we've asserted that the page is allocated, since that aliases the first slot which may not be allocated. This PR also switches to using `as_ptr` to obtain the base pointer for clarity. Co-authored-by: David Koloski <dkoloski@google.com>
- Loading branch information