mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 12:40:14 +03:00
Bugfix: keep TLS data in sync
This commit is contained in:
@@ -111,6 +111,7 @@ pub fn create(dtor: Option<unsafe extern "C" fn(*mut u8)>) -> Key {
|
||||
rtabort!("TLS limit exceeded")
|
||||
};
|
||||
TLS_DESTRUCTOR[index].store(dtor.map_or(0, |f| f as usize), Ordering::Relaxed);
|
||||
unsafe { Self::current() }.data[index].set(ptr::null_mut());
|
||||
Key::from_index(index)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user