1
Fork 0

Miri: run .CRT$XLB linker section on thread-end

This commit is contained in:
Ralf Jung 2024-04-14 18:56:31 +02:00
parent 3305e71095
commit 5934aaaa97
7 changed files with 182 additions and 210 deletions

View file

@ -276,6 +276,7 @@ unsafe fn register_dtor(key: &'static StaticKey) {
// the address of the symbol to ensure it sticks around.
#[link_section = ".CRT$XLB"]
#[cfg_attr(miri, used)] // Miri only considers explicitly `#[used]` statics for `lookup_link_section`
pub static p_thread_callback: unsafe extern "system" fn(c::LPVOID, c::DWORD, c::LPVOID) =
on_tls_callback;