HomeFreeBSD

fix integer overflow bugs in *stosbt

Description

fix integer overflow bugs in *stosbt

68f57679d660 Fixed another class of integer overflows, but introduced a
boundary condition for 2-4s in ns conversion, 2-~4000s in us conversions
and 2-~4,000,000s in ms conversions. This was because we bogusly used
SBT_1S for the notion of 1 second, instead of the appropriate power of

  1. To fix, just use the appropriate power of 10, which avoids these

overflows.

This caused some sleeps in ZFS to be on the order of an hour.

MFC: 1 day
PR: 263073
Sponsored by: Netflix
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D34790

Details

Provenance
impAuthored on Apr 6 2022, 3:35 AM
Reviewer
asomers
Differential Revision
D34790: fix integer overflow bugs in *stosbt
Parents
rGf00f8b4fbd26: cp: fix -R recursion detection
Branches
Unknown
Tags
Unknown