Skip to content

Commit

Permalink
Use ptr::invalid_mut for SGX image base
Browse files Browse the repository at this point in the history
  • Loading branch information
mzohreva committed Nov 17, 2023
1 parent ec8c3d9 commit b576dd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys_common/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ pub fn output_filename(
#[cfg(all(target_vendor = "fortanix", target_env = "sgx"))]
pub fn set_image_base() {
let image_base = crate::os::fortanix_sgx::mem::image_base();
backtrace_rs::set_image_base(crate::ptr::from_exposed_addr_mut(image_base as _));
backtrace_rs::set_image_base(crate::ptr::invalid_mut(image_base as _));
}

#[cfg(not(all(target_vendor = "fortanix", target_env = "sgx")))]
Expand Down

0 comments on commit b576dd2

Please sign in to comment.