Skip to content

Commit

Permalink
Update ABI user
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Aug 6, 2023
1 parent e45affa commit e7911d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/panicking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn begin_panic<E: Exception>(exception: E) -> UnwindReasonCode {
unsafe {
(*ex).exception_class = u64::from_be_bytes(E::CLASS);
(*ex).exception_cleanup = Some(exception_cleanup::<E>);
_Unwind_RaiseException(&mut *ex)
_Unwind_RaiseException(ex)
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/personality.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ fn find_eh_action(
}

#[lang = "eh_personality"]
fn rust_eh_personality(
unsafe fn rust_eh_personality(
version: c_int,
actions: UnwindAction,
_exception_class: u64,
exception: &mut UnwindException,
exception: *mut UnwindException,
unwind_ctx: &mut UnwindContext<'_>,
) -> UnwindReasonCode {
if version != 1 {
Expand Down Expand Up @@ -170,7 +170,7 @@ fn rust_eh_personality(
_Unwind_SetGR(
unwind_ctx,
Arch::UNWIND_DATA_REG.0 .0 as _,
exception as *mut _ as usize,
exception as usize,
);
_Unwind_SetGR(unwind_ctx, Arch::UNWIND_DATA_REG.1 .0 as _, 0);
_Unwind_SetIP(unwind_ctx, lpad);
Expand Down
4 changes: 2 additions & 2 deletions src/personality_dummy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use crate::abi::*;
use crate::util::*;

#[lang = "eh_personality"]
extern "C" fn personality(
unsafe extern "C" fn personality(
version: c_int,
_actions: UnwindAction,
_exception_class: u64,
_exception: &mut UnwindException,
_exception: *mut UnwindException,
_ctx: &mut UnwindContext<'_>,
) -> UnwindReasonCode {
if version != 1 {
Expand Down

0 comments on commit e7911d8

Please sign in to comment.