[Bug libstdc++/93456] No overflow check in __atomic_futex_unsigned_base::_M_futex_wait_until

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 16 21:15:26 GMT 2020


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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:

https://gcc.gnu.org/g:730e1357dfb9aff481d6c47a21ef748f0d810d4f

commit r10-9031-g730e1357dfb9aff481d6c47a21ef748f0d810d4f
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Nov 13 19:11:02 2020 +0000

    libstdc++: Remove redundant overflow check for futex timeout [PR 93456]

    The relative_timespec function already checks for the case where the
    specified timeout is in the past, so the difference can never be
    negative. That means we dn't need to check if it's more negative than
    the minimum time_t value.

    libstdc++-v3/ChangeLog:

            PR libstdc++/93456
            * src/c++11/futex.cc (relative_timespec): Remove redundant check
            negative values.
            * testsuite/30_threads/future/members/93456.cc: New.

    (cherry picked from commit b8d36dcc917e8a06d8c20b9f5ecc920ed2b9e947)


More information about the Gcc-bugs mailing list