Bugfix: keep TLS data in sync

This commit is contained in:
Raoul Strackx 2022-10-13 18:58:25 +02:00
parent 4891d57f7a
commit c46185bea0

View File

@ -111,6 +111,7 @@ impl Tls {
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)
}