Rollup merge of #103017 - fortanix:raoul/sgx_tls_fix, r=ChrisDenton
Avoid dropping TLS Key on sgx
#102655 reenabled dropping thread local `Key` on every platform ([library/std/src/sys_common/thread_local_key.rs](fa0ca783f8 (diff-5cb9acf9e243f35c975fa9fbac4885519dc104626bc03610dfa7a20bc79641ceL237-R215)
)). That's causing problems at least for sgx.
cc: `@jethrogb` `@ChrisDenton`
This commit is contained in:
commit
d47b755683
1 changed files with 1 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue