mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-08 16:03:20 +00:00
The time point is multiplied by an adjustment factor of 1000 for boost::posix_time::time_duration::ticks_per_second() = 1000000 when calling boost::posix_time::milliseconds(count) and that may lead to integer overflow as reported by the UndefinedBehaviorSanitizer. See https://github.com/scylladb/scylla/issues/10830#issuecomment-1158899187 This change checks for possible overflow in advance and prints the raw counter value in this case, along with an explanation. Refs #10830 Signed-off-by: Benny Halevy <bhalevy@scylladb.com> Closes #10831 * github.com:scylladb/scylla: test: types: add test cases for timestamp_type to_string format types: time_point_to_string: harden against out of range timestamps