Go to file
Sergei Trofimovich 3b21c21f3f c++: avoid <memory> poisoning on musl [PR106102]
On musl <pthread.h> uses calloc() (via <sched.h>). <memory> includes
it indirectly and exposes use of poisoned calloc() when module code
is built:

    /build/build/./prev-gcc/xg++ ... ../../gcc-13-20220626/gcc/cp/mapper-resolver.cc
        In file included from /<<NIX>>/musl-1.2.3-dev/include/pthread.h:30,
                 from /build/build/prev-x86_64-unknown-linux-musl/libstdc++-v3/include/x86_64-unknown-linux-musl/bits/gthr-default.h:35,
                 ....
                 from /build/build/prev-x86_64-unknown-linux-musl/libstdc++-v3/include/memory:77,
                 from ../../gcc-13-20220626/gcc/../libcody/cody.hh:24,
                 from ../../gcc-13-20220626/gcc/cp/../../c++tools/resolver.h:25,
                 from ../../gcc-13-20220626/gcc/cp/../../c++tools/resolver.cc:23,
                 from ../../gcc-13-20220626/gcc/cp/mapper-resolver.cc:32:
    /<<NIX>>/musl-1.2.3-dev/include/sched.h:84:7: error: attempt to use poisoned "calloc"
       84 | void *calloc(size_t, size_t);
          |       ^
    /<<NIX>>/musl-1.2.3-dev/include/sched.h:124:36: error: attempt to use poisoned "calloc"
      124 | #define CPU_ALLOC(n) ((cpu_set_t *)calloc(1,CPU_ALLOC_SIZE(n)))
          |                                    ^

gcc/cp/

	PR c++/106102
	* mapper-client.cc: Include <memory> via "system.h".
	* mapper-resolver.cc: Ditto.
	* module.cc: Ditto.

libcc1/

	PR c++/106102
	* libcc1plugin.cc: Include <memory> via "system.h".
	* libcp1plugin.cc: Ditto.
2022-06-27 23:22:02 +01:00
c++tools
config
contrib Daily bump. 2022-06-27 00:16:20 +00:00
fixincludes
gcc c++: avoid <memory> poisoning on musl [PR106102] 2022-06-27 23:22:02 +01:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic
libbacktrace libbacktrace: replace fgrep with grep in configure script 2022-06-27 13:00:01 -07:00
libcc1 c++: avoid <memory> poisoning on musl [PR106102] 2022-06-27 23:22:02 +01:00
libcody
libcpp Daily bump. 2022-06-27 00:16:20 +00:00
libdecnumber
libffi
libgcc Daily bump. 2022-06-26 00:16:33 +00:00
libgfortran
libgo libgo: #include <sys/types.h> when checking for loff_t 2022-06-21 08:03:17 -07:00
libgomp Daily bump. 2022-06-22 00:16:25 +00:00
libiberty Daily bump. 2022-06-27 00:16:20 +00:00
libitm
libobjc
liboffloadmic
libphobos Daily bump. 2022-06-25 00:16:23 +00:00
libquadmath
libsanitizer
libssp
libstdc++-v3 libstdc++: testsuite: use cmath long double overloads 2022-06-27 10:34:19 -03:00
libvtv
lto-plugin lto-plugin: make claim_file_handler thread-safe 2022-06-27 10:12:08 +02:00
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2022-06-27 00:16:20 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure [gdb/build] Fix gdbserver build with -fsanitize=thread 2022-06-27 10:52:23 +02:00
configure.ac [gdb/build] Fix gdbserver build with -fsanitize=thread 2022-06-27 10:52:23 +02:00
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 Remove long deprecated tilegx and tilepro ports 2022-06-25 13:55:21 -04: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.