public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/106102] gcc/cp/mapper-resolver.cc fails to build against musl: musl-1.2.3-dev/include/sched.h:84:7: error: attempt to use poisoned "calloc" Date: Sat, 02 Jul 2022 15:22:11 +0000 [thread overview] Message-ID: <bug-106102-4-pwqECt3EiD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106102-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106102 --- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Sergei Trofimovich <slyfox@gcc.gnu.org>: https://gcc.gnu.org/g:de6f402a54f7e6a3f8a79d723a25724e6274cc3e commit r12-8539-gde6f402a54f7e6a3f8a79d723a25724e6274cc3e Author: Sergei Trofimovich <siarheit@google.com> Date: Mon Jun 27 13:27:24 2022 +0100 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. (cherry picked from commit 3b21c21f3f5726823e19728fdd1571a14aae0fb3)
next prev parent reply other threads:[~2022-07-02 15:22 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-27 10:05 [Bug c++/106102] New: " slyfox at gcc dot gnu.org 2022-06-27 10:10 ` [Bug c++/106102] " sam at gentoo dot org 2022-06-27 10:51 ` rguenth at gcc dot gnu.org 2022-06-27 12:03 ` slyfox at gcc dot gnu.org 2022-06-27 14:50 ` slyfox at gcc dot gnu.org 2022-06-27 22:22 ` cvs-commit at gcc dot gnu.org 2022-06-27 23:00 ` slyfox at gcc dot gnu.org 2022-06-29 18:17 ` cvs-commit at gcc dot gnu.org 2022-07-02 15:22 ` cvs-commit at gcc dot gnu.org [this message] 2022-07-02 15:22 ` cvs-commit at gcc dot gnu.org 2022-07-02 15:26 ` slyfox at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-106102-4-pwqECt3EiD@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).