Open devnexen opened 1 week ago
Instead of ignoring the test on the target, can you add -Zmiri-ignore-leaks
using the revisions system such as done in this test:
https://github.com/rust-lang/miri/blob/60a720040d6c60656ab9cac0980e587d19d9c07a/tests/pass/tree_borrows/tree-borrows.rs#L1-L3
I think you need multiple revisions as in the example. Does the test now fail on Linux if you add a leak to it?
I don't see why this test should be ignored on Solarish. It shows that we are not properly recognizing main thread TLS variables as being allowed-to-leak -- that should be fixed, not ignored. There is no cleanup callback called here on any platform, since Cell<Option<&'static i32>>
has no destructor -- that's the entire point.
Also, other tests like tls_macro_drop and tls_static work fine. "on these platforms, thread_local is disabled" does not seem to be correct. The cleanup callback is called when it is needed. So I don't follow your PR description either.
on these platforms, thread_local is disabled as there is no support for cleanup callback, the test is leaking here.