Skip to content

Commit 79fb037

Browse files
olioli-obk
oli
authored andcommitted
Remove now-unnecessary miri_static_root invocation
1 parent aabe70f commit 79fb037

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

library/std/src/sys/windows/thread_local_key.rs

-13
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,6 @@ struct Node {
110110
next: *mut Node,
111111
}
112112

113-
#[cfg(miri)]
114-
extern "Rust" {
115-
/// Miri-provided extern function to mark the block `ptr` points to as a "root"
116-
/// for some static memory. This memory and everything reachable by it is not
117-
/// considered leaking even if it still exists when the program terminates.
118-
///
119-
/// `ptr` has to point to the beginning of an allocated block.
120-
fn miri_static_root(ptr: *const u8);
121-
}
122-
123113
unsafe fn register_dtor(key: Key, dtor: Dtor) {
124114
let mut node = Box::new(Node { key, dtor, next: ptr::null_mut() });
125115

@@ -128,9 +118,6 @@ unsafe fn register_dtor(key: Key, dtor: Dtor) {
128118
node.next = head;
129119
match DTORS.compare_exchange(head, &mut *node, SeqCst, SeqCst) {
130120
Ok(_) => {
131-
#[cfg(miri)]
132-
miri_static_root(&*node as *const _ as *const u8);
133-
134121
mem::forget(node);
135122
return;
136123
}

0 commit comments

Comments
 (0)