Skip to content

Conversation

@nicholasbishop
Copy link
Member

When running the file info tests under Miri with
-Zmiri-tag-raw-pointers enabled, new_impl triggered a Stacked
Borrows error. This occurred because after a mutable info pointer to the
raw u8 buffer was created, we went back and created another mutable
pointer within the u8 buffer to copy the name string into.

Fix by creating the name destination pointer from the info pointer
rather than the u8 buffer pointer.

When running the file info tests under Miri with `-Zmiri-tag-raw-pointers` enabled, `new_impl` triggered a Stacked Borrows error. This occurred because after a mutable info pointer to the raw `u8` buffer was created, we went back and created another mutable pointer within the `u8` buffer to copy the name string into. Fix by creating the name destination pointer from the info pointer rather than the `u8` buffer pointer.
@nicholasbishop
Copy link
Member Author

(I'd like to enable -Zmiri-tag-raw-pointers as part of the CI eventually, but there are some issues with DevicePath I need to work through first.)

@GabrielMajeri GabrielMajeri merged commit 200c9fa into rust-osdev:main Apr 23, 2022
@nicholasbishop nicholasbishop deleted the bishop-better-info-ptr branch April 24, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants