Skip to content

Commit e5dc1e3

Browse files
committed
Add comments for #[no_sanitize(cfi)] in stdlib
1 parent 02bb2d4 commit e5dc1e3

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

Diff for: library/std/src/sys/fs/unix.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1454,6 +1454,8 @@ impl File {
14541454
Ok(())
14551455
}
14561456

1457+
// FIXME(#115199): Rust currently omits weak function definitions
1458+
// and its metadata from LLVM IR.
14571459
#[cfg_attr(
14581460
any(
14591461
target_os = "android",

Diff for: library/std/src/sys/pal/unix/fd.rs

+2
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,8 @@ impl FileDesc {
251251
}
252252

253253
#[cfg(all(target_os = "android", target_pointer_width = "32"))]
254+
// FIXME(#115199): Rust currently omits weak function definitions
255+
// and its metadata from LLVM IR.
254256
#[no_sanitize(cfi)]
255257
pub fn read_vectored_at(&self, bufs: &mut [IoSliceMut<'_>], offset: u64) -> io::Result<usize> {
256258
super::weak::weak!(fn preadv64(libc::c_int, *const libc::iovec, libc::c_int, off64_t) -> isize);

Diff for: library/std/src/sys/pal/unix/process/process_unix.rs

+2
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,8 @@ impl Command {
434434
target_os = "nto",
435435
target_vendor = "apple",
436436
))]
437+
// FIXME(#115199): Rust currently omits weak function definitions
438+
// and its metadata from LLVM IR.
437439
#[cfg_attr(target_os = "linux", no_sanitize(cfi))]
438440
fn posix_spawn(
439441
&mut self,

Diff for: library/std/src/sys/pal/unix/thread.rs

+2
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ impl Thread {
188188
}
189189

190190
#[cfg(any(target_os = "solaris", target_os = "illumos", target_os = "nto"))]
191+
// FIXME(#115199): Rust currently omits weak function definitions
192+
// and its metadata from LLVM IR.
191193
#[no_sanitize(cfi)]
192194
pub fn set_name(name: &CStr) {
193195
weak! {

Diff for: library/std/src/sys/pal/unix/time.rs

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ impl Timespec {
9696
}
9797
}
9898

99+
// FIXME(#115199): Rust currently omits weak function definitions
100+
// and its metadata from LLVM IR.
99101
#[cfg_attr(
100102
all(
101103
target_os = "linux",

Diff for: library/std/src/sys/pal/unix/weak.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ unsafe fn fetch(name: &str) -> *mut libc::c_void {
144144
#[cfg(not(any(target_os = "linux", target_os = "android")))]
145145
pub(crate) macro syscall {
146146
(fn $name:ident($($arg_name:ident: $t:ty),*) -> $ret:ty) => (
147-
// FIXME: Rust currently omits weak function definitions
147+
// FIXME(#115199): Rust currently omits weak function definitions
148148
// and its metadata from LLVM IR.
149149
#[no_sanitize(cfi)]
150150
unsafe fn $name($($arg_name: $t),*) -> $ret {

0 commit comments

Comments
 (0)