You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be seen under miri in the should_panic tests.
It'd at least be good to add a way to free the data properly in tests, so that we can distinguish these leaks from other potential leaks. e.g. during unwind we could add pointers to things we'd otherwise leak to a global list that could be freed properly after catching the panic.
Maybe something like that could be exposed to crate users as well, though I don't see a way of implementing it that isn't super unsafe. Maybe the global could store something like Box<dyn Drop>, so that pointers can still be dropped properly, ignoring locking? We could expose an unsafe method like drop_leaked_objects to do it. (And maybe an alternative safe method that permanently leaks the objects instead)
In the meantime we can tell miri to ignore leaks. e.g. MIRIFLAGS="-Zmiri-ignore-leaks" cargo miri test
The text was updated successfully, but these errors were encountered:
This can be seen under miri in the
should_panic
tests.It'd at least be good to add a way to free the data properly in tests, so that we can distinguish these leaks from other potential leaks. e.g. during unwind we could add pointers to things we'd otherwise leak to a global list that could be freed properly after catching the panic.
Maybe something like that could be exposed to crate users as well, though I don't see a way of implementing it that isn't super unsafe. Maybe the global could store something like
Box<dyn Drop>
, so that pointers can still be dropped properly, ignoring locking? We could expose anunsafe
method likedrop_leaked_objects
to do it. (And maybe an alternative safe method that permanently leaks the objects instead)In the meantime we can tell miri to ignore leaks. e.g.
MIRIFLAGS="-Zmiri-ignore-leaks" cargo miri test
The text was updated successfully, but these errors were encountered: