[Bug libstdc++/75402] New: std::condition_variable::wait_until wakes up constantly

nfitzgerald at mozilla dot com gcc-bugzilla@gcc.gnu.org
Fri Aug 12 20:22:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=75402

            Bug ID: 75402
           Summary: std::condition_variable::wait_until wakes up
                    constantly
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nfitzgerald at mozilla dot com
  Target Milestone: ---

Created attachment 39353
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39353&action=edit
testcase.cpp

Expected:

The thread calling std::condition_variable::wait_until has no (or very very
few) wake ups until the specified timeout

Actual:

The thread is woken up constantly.

std::condition_variable::wait_until ends up passing a bad timespec as the futex
timeout.

----------------

This test case fails with both std::chrono::steady_clock and
std::chrono::system_clock. I didn't test any other clocks.


More information about the Gcc-bugs mailing list