Closed nico-abram closed 3 years ago
Oh, sorry, I just realized it's being converted to a *mut so this should not be a problem. I'm closing this
(I think there might still be issues w.r.t pointer provenance but that's a lot murkier)
Yep it should be fine as the user can't hold references to the data. The stuff also isn't send to no multithreading issues.
But if some one can prove something wrong feel free.
Hello, I'm not an alpm user, but I got here from this reddit post and I couldn't help but worry that AnyQuestion::question might be unsound. I see it in the public documentation here https://docs.rs/alpm/2.0.2/alpm/struct.AnyQuestion.html#method.question
Is there anything stopping a user from calling question twice in succession, generating two Question<'a> at the same time, which contain &mut's to the same thing, which (Because of the &mut aliasing rules) is insta UB (As far as I know)?
I do not have time right now but I will try to come up with an example later. Basically something of the form