Expand description
CFI types for cross-language LLVM CFI support.
The cfi_types crate provides a new set of C types as user-defined types using the cfi_encoding attribute and repr(transparent) to be used for cross-language LLVM CFI support. This new set of C types allows the Rust compiler to identify and correctly encode C types in extern “C” function types indirectly called across the FFI boundary when CFI is enabled.
The use of these types are optional and are recommended for when enforcement and explicitness of types used across the FFI boundary and no loss of granularity for cross-language LLVM CFI are preferred.
Alternatively, the -Zsanitizer-cfi-normalize-integers
option may be used
with the Clang -fsanitize-cfi-icall-experimental-normalize-integers
option
for cross-language LLVM CFI support.
Structs§
- c_char
- CFI type equivalent to Rust’s core::ffi::c_char type alias.
- c_int
- CFI type equivalent to Rust’s core::ffi::c_int type alias.
- c_long
- CFI type equivalent to Rust’s core::ffi::c_long type alias.
- c_
longlong - CFI type equivalent to Rust’s core::ffi::c_longlong type alias.
- c_schar
- CFI type equivalent to Rust’s core::ffi::c_schar type alias.
- c_short
- CFI type equivalent to Rust’s core::ffi::c_short type alias.
- c_uchar
- CFI type equivalent to Rust’s core::ffi::c_uchar type alias.
- c_uint
- CFI type equivalent to Rust’s core::ffi::c_uint type alias.
- c_ulong
- CFI type equivalent to Rust’s core::ffi::c_ulong type alias.
- c_
ulonglong - CFI type equivalent to Rust’s core::ffi::c_ulonglong type alias.
- c_
ushort - CFI type equivalent to Rust’s core::ffi::c_ushort type alias.