diff options
| author | bors <bors@rust-lang.org> | 2024-06-28 23:43:57 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-28 23:43:57 +0000 |
| commit | 9ed2ab3790ff41bf741dd690befd6a1c1e2b23ca (patch) | |
| tree | ba166ee8844fe984d39dbd1ba918aad35a6a7ec0 /src | |
| parent | e9e6e2e444c30c23a9c878a88fbc3978c2acad95 (diff) | |
| parent | 57931e50409f9365791f7923a68f9ae1ec301c4c (diff) | |
Auto merge of #127099 - lqd:revert-126938, r=compiler-errors
Revert "miri: make sure we can find link_section statics even for the local crate" This PR reverts #126938 as [requested by its author](https://github.com/rust-lang/rust/issues/127052#issuecomment-2196793473), to fix the #127052 regression. Fixes #127052 We should probably improve the [`used` rmake test(s)](https://github.com/rust-lang/rust/blob/57931e50409f9365791f7923a68f9ae1ec301c4c/tests/run-make/used/rmake.rs#L7) in the future, but this should do for now.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/miri/tests/pass/tls/win_tls_callback.rs | 16 | ||||
| -rw-r--r-- | src/tools/miri/tests/pass/tls/win_tls_callback.stderr | 1 |
2 files changed, 0 insertions, 17 deletions
diff --git a/src/tools/miri/tests/pass/tls/win_tls_callback.rs b/src/tools/miri/tests/pass/tls/win_tls_callback.rs deleted file mode 100644 index 99a8de29e91..00000000000 --- a/src/tools/miri/tests/pass/tls/win_tls_callback.rs +++ /dev/null @@ -1,16 +0,0 @@ -//! Ensure that we call Windows TLS callbacks in the local crate. -//@only-target-windows -// Calling eprintln in the callback seems to (re-)initialize some thread-local storage -// and then leak the memory allocated for that. Let's just ignore these leaks, -// that's not what this test is about. -//@compile-flags: -Zmiri-ignore-leaks - -#[link_section = ".CRT$XLB"] -#[used] // Miri only considers explicitly `#[used]` statics for `lookup_link_section` -pub static CALLBACK: unsafe extern "system" fn(*const (), u32, *const ()) = tls_callback; - -unsafe extern "system" fn tls_callback(_h: *const (), _dw_reason: u32, _pv: *const ()) { - eprintln!("in tls_callback"); -} - -fn main() {} diff --git a/src/tools/miri/tests/pass/tls/win_tls_callback.stderr b/src/tools/miri/tests/pass/tls/win_tls_callback.stderr deleted file mode 100644 index 84795589544..00000000000 --- a/src/tools/miri/tests/pass/tls/win_tls_callback.stderr +++ /dev/null @@ -1 +0,0 @@ -in tls_callback |
