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
In 0.9-pre codeline, fs::stat() returns truncated times.
The problem seems to be in uvio::fs_mkstat(). fs::stat() calls io::fs_lstat() which calls uvio::fs_mkstat(). Its to_msec() converts an C time from uv_timespec_t into Rust time.
tv_sec and tv_nsec are in c_long, which can be 32-bit. to_msec() multiplies tv_sec with 1000, which will truncate the high bits of a large 32-bit time value. tv_sec needs to be casted to u64 before multiplied with 1000 to avoid the truncation problem.
The text was updated successfully, but these errors were encountered:
In 0.9-pre codeline, fs::stat() returns truncated times.
The problem seems to be in uvio::fs_mkstat(). fs::stat() calls io::fs_lstat() which calls uvio::fs_mkstat(). Its to_msec() converts an C time from uv_timespec_t into Rust time.
tv_sec and tv_nsec are in c_long, which can be 32-bit. to_msec() multiplies tv_sec with 1000, which will truncate the high bits of a large 32-bit time value. tv_sec needs to be casted to u64 before multiplied with 1000 to avoid the truncation problem.
The text was updated successfully, but these errors were encountered: