-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid dropping TLS Key on sgx #103017
Avoid dropping TLS Key on sgx #103017
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
I apologise, I assumed from a comment in the code that only Windows would be affected but I really should have checked. I wonder if a more principled approach would be to add a function to // library/std/src/sys/sgx/thread_local_key.rs
#[inline(always)]
pub fn destroy_on_drop() -> bool {
false
} I.e. something similar to the now removed |
This comment has been minimized.
This comment has been minimized.
Sorry about this, I didn't check for this in the original PR. Could you share details on the problem? |
We're still investigating the issue, but the symptom is that the |
Can we please merge this to get |
Does this really fix the test? Because that test does not even use |
e15fe6c
to
e48bea5
Compare
Yes it does. I'm still investigating why destroying the key leads to issues. |
e48bea5
to
c46185b
Compare
Found the main culprit! Data wasn't always kept in sync that caused |
LGTM @bors r+ rollup |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#102092 (refactor: use grep -E/-F instead of fgrep/egrep) - rust-lang#102781 (Improved documentation for `std::io::Error`) - rust-lang#103017 (Avoid dropping TLS Key on sgx) - rust-lang#103039 (checktools: fix comments) - rust-lang#103045 (Remove leading newlines from integer primitive doc examples) - rust-lang#103047 (Update browser-ui-test version to fix some flaky tests) - rust-lang#103054 (Clean up rust-logo rustdoc GUI test) - rust-lang#103059 (Fix `Duration::{try_,}from_secs_f{32,64}(-0.0)`) - rust-lang#103067 (More alphabetical sorting) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
#102655 reenabled dropping thread local
Key
on every platform (library/std/src/sys_common/thread_local_key.rs). That's causing problems at least for sgx.cc: @jethrogb @ChrisDenton