Go to file
Jonathan Wakely e7e0eeeb6e libstdc++: Avoid 32-bit time_t overflows in futex calls
The existing code doesn't check whether the chrono::seconds value is out
of range of time_t. When using a timeout before the epoch (with a
negative value) subtracting the current time (as time_t) and then
assigning it to a time_t can overflow to a large positive value. This
means that we end up waiting several years even though the specific
timeout was in the distant past.

We do have a check for negative timeouts, but that happens after the
conversion to time_t so happens after the overflow.

The conversion to a relative timeout is done in two places, so this
factors it into a new function and adds the overflow checks there.

libstdc++-v3/ChangeLog:

	* src/c++11/futex.cc (relative_timespec): New function to
	create relative time from two absolute times.
	(__atomic_futex_unsigned_base::_M_futex_wait_until)
	(__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
	Use relative_timespec.
2020-11-13 17:19:12 +00:00
config
contrib Daily bump. 2020-11-08 00:16:31 +00:00
fixincludes
gcc Add 3 new EVRP testcases. 2020-11-13 11:43:38 -05:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace
libcc1 Daily bump. 2020-11-12 00:16:39 +00:00
libcpp Daily bump. 2020-11-13 00:16:35 +00:00
libdecnumber
libffi
libgcc Daily bump. 2020-11-11 00:16:36 +00:00
libgfortran
libgo libgo: update to Go 1.15.4 release 2020-11-10 07:25:32 -08:00
libgomp Daily bump. 2020-11-13 00:16:35 +00:00
libhsail-rt
libiberty Daily bump. 2020-11-12 00:16:39 +00:00
libitm
libobjc
liboffloadmic
libphobos libphobos: Update libtool version to 2:0:0 2020-11-13 14:58:58 +01:00
libquadmath
libsanitizer libsanitizer: update LOCAL_PATCHES. 2020-11-13 17:31:16 +01:00
libssp
libstdc++-v3 libstdc++: Avoid 32-bit time_t overflows in futex calls 2020-11-13 17:19:12 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2020-11-10 00:16:24 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in config-ml.in: Suppress output from multi-do recipes 2020-11-09 14:28:37 +00:00
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: add myself for write after approval 2020-11-13 11:01:12 +08:00
Makefile.def
Makefile.in
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.