Skip to content

Conversation

@nicholasbishop
Copy link
Member

The Handle::from_ptr and SystemTable<View>::from_ptr doctests use a
0xdeadbeef pointer, which of course is not valid. Change the tests to
compile but not actually run so that they don't trigger UB.

Noticed this when running the unit tests with Miri, which caught the
undefined behavior the in the SystemTable case.

The `Handle::from_ptr` and `SystemTable<View>::from_ptr` doctests use a `0xdeadbeef` pointer, which of course is not valid. Change the tests to compile but not actually run so that they don't trigger UB. Noticed this when running the unit tests with Miri, which caught the undefined behavior the in the SystemTable case.
@GabrielMajeri
Copy link
Collaborator

Thanks!

@GabrielMajeri GabrielMajeri merged commit 6aa14ab into rust-osdev:main Mar 2, 2022
@nicholasbishop nicholasbishop deleted the bishop-no-run-deadbeef branch March 2, 2022 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants