[SERVER-43771] Make v4.0's ClockSource::waitForConditionUntil avoid conversion of Date_t::max() to system time Created: 02/Oct/19  Updated: 29/Oct/23  Resolved: 21/Oct/19

Status: Closed
Project: Core Server
Component/s: Internal Code, Security
Affects Version/s: None
Fix Version/s: 4.0.14

Type: Bug Priority: Major - P3
Reporter: Spencer Jackson Assignee: Shreyas Kalyan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Security 2019-10-21
Participants:
Case:
Linked BF Score: 41

 Description   

When ClockSource::waitForConditionUntil is asked to wait for the foreseeable future, it may be passed a deadline of Date_t::max(). A conversion from this Date_t to a time point in the system clock, may result in an integer overflow which throws a DurationOverflow exception. 4.2 and above detect and gracefully handle the Date_t::max() deadline. 4.0 should as well.



 Comments   
Comment by Kelly Lewis [ 22/Oct/19 ]

Hi shreyas.kalyan, with this resolved, are you able to also close BF-14753?

Comment by Githook User [ 18/Oct/19 ]

Author:

{'name': 'Shreyas Kalyan', 'username': 'shreyaskal', 'email': 'shreyas.kalyan@mongodb.com'}

Message: SERVER-43771 Make v4.0's ClockSource::waitForConditionUntil avoid conversion of Date_t::max() to system time
Branch: v4.0
https://github.com/mongodb/mongo/commit/a18bb6743e7b19963d8e211a038320a22a2ced8c

Generated at Thu Feb 08 05:04:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.