about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-11-12 21:27:04 +0000
committerbors <bors@rust-lang.org>2019-11-12 21:27:04 +0000
commita333eed7fc0c903df9d6befcfb40af02148bf255 (patch)
treef58c8bd9ef3b92b31916f3a4eda588a00e41fb75 /src/libcore
parent4f03f4a989d1c8346c19dfb417a77c09b34408b8 (diff)
parentb4545a4ad625c68479120db845280f4c61b39640 (diff)
downloadrust-a333eed7fc0c903df9d6befcfb40af02148bf255.tar.gz
rust-a333eed7fc0c903df9d6befcfb40af02148bf255.zip
Auto merge of #60026 - Aaron1011:feature/miri-unwind, r=RalfJung,oli-obk
Add hooks for Miri panic unwinding

This commits adds in some additional hooks to allow Miri to properly
handle panic unwinding. None of this should have any impact on CTFE mode

This supports https://github.com/rust-lang/miri/pull/693
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/intrinsics.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 3db85d05d7a..686d0bbefc8 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -1348,6 +1348,11 @@ extern "rust-intrinsic" {
     /// See documentation of `<*const T>::offset_from` for details.
     #[cfg(not(bootstrap))]
     pub fn ptr_offset_from<T>(ptr: *const T, base: *const T) -> isize;
+
+    /// Internal hook used by Miri to implement unwinding.
+    /// Perma-unstable: do not use
+    #[cfg(not(bootstrap))]
+    pub fn miri_start_panic(data: *mut (dyn crate::any::Any + crate::marker::Send)) -> !;
 }
 
 // Some functions are defined here because they accidentally got made