This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] libstdc++/58038 libstdc++/60421 fix overflows in std::this_thread::sleep_for()


On 26/03/15 19:59 +0000, Jonathan Wakely wrote:
We have a couple of bugs where durations with unsigned representations
result in negative or huge time_t values, which result in not sleeping
at all or sleeping for billions of years (or merely for decades if you
have a 32-bit time_t).

This change simply returns early for time points in the past or
negative durations.

Tested x86_64-linux, powerpc64le-linux, committed to trunk.

Also committed to the 4.9 branch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]