-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hello, thank you for your contribution in this project, I am scanning the unsoundness problem in rust project.
I notice the following code:
impl<'rt> RuntimeHandle<'rt> {
// Creates a new RuntimeHandle; it's the caller's responsibility to make
// sure that the runtime is not destroyed while objects under this runtime
// are still being used
pub fn new_unchecked(ptr: *mut sys::Runtime) -> Self {
RuntimeHandle(ptr, PhantomData)
}
If it is caller's responsibility to make responsibility to make are still being used, maybe this function should be marked as unsafe
and doc it with ///SAFETY
? This is more in line with rust's security requirements, In Rust, if only safe code is used that results in UB being considered unsound and violating Rust's security guarantees.
Metadata
Metadata
Assignees
Labels
No labels