about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-07-24 22:00:23 +0000
committerbors <bors@rust-lang.org>2020-07-24 22:00:23 +0000
commit5ef299eb9805b4c86b227b718b39084e8bf24454 (patch)
tree3e2e397069a66471fe17991bbdcdef37bf4ef489 /src/libcore
parentd8cf749570c87a4dcf05071bb5b280febb7f6657 (diff)
parent67b4f3b1482971f6eaecec0c5e01f8be467c491a (diff)
Auto merge of #74681 - RalfJung:miri-extern-fn, r=oli-obk
 Miri: use extern fn to expose interpreter operations to program; fix leak checker on Windows

This PR realizes an idea that @oli-obk has been suggesting for a while: to use Miri-specific `extern` functions to provide some extra capabilities to the program. Initially, we have two of these methods, which libstd itself needs:
* `miri_start_panic`, which replaces the intrinsic of the same name (mostly for consistency, to avoid having multiple mechanisms for Miri-specific functionality).
* `miri_static_root`, which adds an allocation to a list of static "roots" that Miri considers as not having leaked (including all memory reachable through them). This is needed for https://github.com/rust-lang/miri/issues/1302.

We use `extern` functions instead of intrinsics for this so that user code can more easily call these Miri hoolks -- e.g. `miri_static_root` should be useful for https://github.com/rust-lang/miri/issues/1318.

The Miri side of this is at https://github.com/rust-lang/miri/pull/1485.

r? @oli-obk
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/intrinsics.rs8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 1af4f1009d1..71780361d29 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -1947,14 +1947,6 @@ extern "rust-intrinsic" {
     #[rustc_const_unstable(feature = "const_ptr_offset_from", issue = "41079")]
     pub fn ptr_offset_from<T>(ptr: *const T, base: *const T) -> isize;
 
-    /// Internal hook used by Miri to implement unwinding.
-    /// ICEs when encountered during non-Miri codegen.
-    ///
-    /// The `payload` ptr here will be exactly the one `do_catch` gets passed by `try`.
-    ///
-    /// Perma-unstable: do not use.
-    pub fn miri_start_panic(payload: *mut u8) -> !;
-
     /// Internal placeholder for injecting code coverage counters when the "instrument-coverage"
     /// option is enabled. The placeholder is replaced with `llvm.instrprof.increment` during code
     /// generation.