summaryrefslogtreecommitdiffstats
path: root/library/panic_abort/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:37 +0000
commit246f239d9f40f633160f0c18f87a20922d4e77bb (patch)
tree5a88572663584b3d4d28e5a20e10abab1be40884 /library/panic_abort/src
parentReleasing progress-linux version 1.64.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-246f239d9f40f633160f0c18f87a20922d4e77bb.tar.xz
rustc-246f239d9f40f633160f0c18f87a20922d4e77bb.zip
Merging debian version 1.65.0+dfsg1-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--library/panic_abort/src/android.rs2
-rw-r--r--library/panic_abort/src/lib.rs33
2 files changed, 5 insertions, 30 deletions
diff --git a/library/panic_abort/src/android.rs b/library/panic_abort/src/android.rs
index 18bb932f1..0fd824f8a 100644
--- a/library/panic_abort/src/android.rs
+++ b/library/panic_abort/src/android.rs
@@ -42,7 +42,7 @@ pub(crate) unsafe fn android_set_abort_message(payload: *mut &mut dyn BoxMeUp) {
return; // allocation failure
}
copy_nonoverlapping(msg.as_ptr(), buf as *mut u8, msg.len());
- buf.offset(msg.len() as isize).write(0);
+ buf.add(msg.len()).write(0);
let func = transmute::<usize, SetAbortMessageType>(func_addr);
func(buf);
diff --git a/library/panic_abort/src/lib.rs b/library/panic_abort/src/lib.rs
index 8801c670b..cba8ef25d 100644
--- a/library/panic_abort/src/lib.rs
+++ b/library/panic_abort/src/lib.rs
@@ -113,27 +113,11 @@ pub unsafe fn __rust_start_panic(_payload: *mut &mut dyn BoxMeUp) -> u32 {
// binaries, but it should never be called as we don't link in an unwinding
// runtime at all.
pub mod personalities {
- #[rustc_std_internal_symbol]
- #[cfg(not(any(
- all(target_family = "wasm", not(target_os = "emscripten")),
- all(target_os = "windows", target_env = "gnu", target_arch = "x86_64",),
- )))]
- pub extern "C" fn rust_eh_personality() {}
-
- // On x86_64-pc-windows-gnu we use our own personality function that needs
- // to return `ExceptionContinueSearch` as we're passing on all our frames.
- #[rustc_std_internal_symbol]
- #[cfg(all(target_os = "windows", target_env = "gnu", target_arch = "x86_64"))]
- pub extern "C" fn rust_eh_personality(
- _record: usize,
- _frame: usize,
- _context: usize,
- _dispatcher: usize,
- ) -> u32 {
- 1 // `ExceptionContinueSearch`
- }
+ // In the past this module used to contain stubs for the personality
+ // functions of various platforms, but these where removed when personality
+ // functions were moved to std.
- // Similar to above, this corresponds to the `eh_catch_typeinfo` lang item
+ // This corresponds to the `eh_catch_typeinfo` lang item
// that's only used on Emscripten currently.
//
// Since panics don't generate exceptions and foreign exceptions are
@@ -143,13 +127,4 @@ pub mod personalities {
#[allow(non_upper_case_globals)]
#[cfg(target_os = "emscripten")]
static rust_eh_catch_typeinfo: [usize; 2] = [0; 2];
-
- // These two are called by our startup objects on i686-pc-windows-gnu, but
- // they don't need to do anything so the bodies are nops.
- #[rustc_std_internal_symbol]
- #[cfg(all(target_os = "windows", target_env = "gnu", target_arch = "x86"))]
- pub extern "C" fn rust_eh_register_frames() {}
- #[rustc_std_internal_symbol]
- #[cfg(all(target_os = "windows", target_env = "gnu", target_arch = "x86"))]
- pub extern "C" fn rust_eh_unregister_frames() {}
}