Skip to content

Commit 14447a8

Browse files
committed
Auto merge of rust-lang#123937 - RalfJung:miri-link-section, r=oli-obk
Miri on Windows: run .CRT$XLB linker section on thread-end Hopefully fixes rust-lang#123583 First commit is originally by `@bjorn3` r? `@oli-obk` Cc `@ChrisDenton`
2 parents 443a6fb + e7822c7 commit 14447a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: std/src/sys/pal/windows/thread_local_key.rs

+1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ unsafe fn register_dtor(key: &'static StaticKey) {
276276
// the address of the symbol to ensure it sticks around.
277277

278278
#[link_section = ".CRT$XLB"]
279+
#[cfg_attr(miri, used)] // Miri only considers explicitly `#[used]` statics for `lookup_link_section`
279280
pub static p_thread_callback: unsafe extern "system" fn(c::LPVOID, c::DWORD, c::LPVOID) =
280281
on_tls_callback;
281282

0 commit comments

Comments
 (0)