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
Linux uses unsigned types for stat fields like st_mtime which are actually signed. Values with the most significant bit indicate negative time offsets from the epoch, which is to say, dates before 1970. Currently rustix just re-exports the kernel's stat struct, so it inherits this problem of using unsigned types for things that hold signed data.
rustix should change to using its own type for stat. That's also a chance to make st_mode be a Mode, st_uid be a Uid, and so on, and maybe even have things like st_mtime/st_mtime_nsec be a Timespec.
While here, macOS has a bug with negative timestamps, details here, and rustix should consider applying a similar fix.
The text was updated successfully, but these errors were encountered:
Linux uses unsigned types for
stat
fields likest_mtime
which are actually signed. Values with the most significant bit indicate negative time offsets from the epoch, which is to say, dates before 1970. Currently rustix just re-exports the kernel'sstat
struct, so it inherits this problem of using unsigned types for things that hold signed data.rustix should change to using its own type for
stat
. That's also a chance to makest_mode
be aMode
,st_uid
be aUid
, and so on, and maybe even have things likest_mtime
/st_mtime_nsec
be aTimespec
.While here, macOS has a bug with negative timestamps, details here, and rustix should consider applying a similar fix.
The text was updated successfully, but these errors were encountered: