Skip to content

Commit

Permalink
Rollup merge of #117790 - rcvalle:rust-cfi-fix-000000, r=workingjubilee
Browse files Browse the repository at this point in the history
CFI: Add missing use core::ffi::c_int

Adds missing use core::ffi::c_int for when sanitizer_cfi_normalize_integers is defined.
  • Loading branch information
Noratrieb committed Nov 21, 2023
2 parents 390e3c8 + 55e3dc4 commit 6bb671e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions library/std/src/sys/unix/thread_local_dtor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ pub unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern "C" fn(*mut u8)) {
/// This is necessary because the __cxa_thread_atexit_impl implementation
/// std links to by default may be a C or C++ implementation that was not
/// compiled using the Clang integer normalization option.
#[cfg(sanitizer_cfi_normalize_integers)]
use core::ffi::c_int;
#[cfg(not(sanitizer_cfi_normalize_integers))]
#[cfi_encoding = "i"]
#[repr(transparent)]
Expand Down

0 comments on commit 6bb671e

Please sign in to comment.