Skip to content

Commit d055a0d

Browse files
unix: sometimes a safety comment is a prayer
Co-authored-by: Jonas Böttiger <[email protected]>
1 parent eea90e8 commit d055a0d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

library/std/src/sys/pal/unix/stack_overflow.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,7 @@ mod imp {
9696
_data: *mut libc::c_void,
9797
) {
9898
let (start, end) = GUARD.get();
99-
if info.is_null() || !info.is_aligned() {
100-
rtabort!("signal handler passed null/non-aligned siginfo_t ptr")
101-
};
102-
// SAFETY: we've done our due diligence, so assume the pointer is to a real siginfo_t
99+
// SAFETY: this pointer is provided by the system and will always point to a valid `siginfo_t`.
103100
let addr = unsafe { (*info).si_addr() as usize };
104101

105102
// If the faulting address is within the guard page, then we print a

0 commit comments

Comments
 (0)