You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While auditing mio for Fuchsia, I usually grep for unsafe and audit the unsafe blocks. However, the syscall! macros for unix and windows include their own unsafe { .. } blocks wrapping the underlying unsafe functions. This makes it harder to ensure that every syscall is properly justified. Removing the unsafe blocks from the macro would help solve this problem; whoever uses the macro would need to wrap it in unsafe { .. } and provide a safety comment at the usage site.
The text was updated successfully, but these errors were encountered:
System calls are inherintly unsafe, I don't think add unsafe blocks and comments everywhere is going to help. Furthermore there are plenty for system calls that aren't really unsafe. For example socket(2), it can't do any dangerous. Of course things like read(2) and write(2) can cause you read/write arbitrary memory, but most of those calls we delegated to std lib.
While auditing mio for Fuchsia, I usually grep for
unsafe
and audit the unsafe blocks. However, thesyscall!
macros for unix and windows include their ownunsafe { .. }
blocks wrapping the underlying unsafe functions. This makes it harder to ensure that every syscall is properly justified. Removing the unsafe blocks from the macro would help solve this problem; whoever uses the macro would need to wrap it inunsafe { .. }
and provide a safety comment at the usage site.The text was updated successfully, but these errors were encountered: