Skip to content

Commit 240b834

Browse files
committed
Bugfix: keep TLS data in sync
1 parent 3a210b8 commit 240b834

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

std/src/sys/sgx/abi/tls/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ impl Tls {
111111
rtabort!("TLS limit exceeded")
112112
};
113113
TLS_DESTRUCTOR[index].store(dtor.map_or(0, |f| f as usize), Ordering::Relaxed);
114+
unsafe { Self::current() }.data[index].set(ptr::null_mut());
114115
Key::from_index(index)
115116
}
116117

0 commit comments

Comments
 (0)