public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ed at catmur dot uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109882] New: -fsanitize=thread #include <memory> transitively includes sanitizer/common_interface_defs.h Date: Tue, 16 May 2023 23:14:45 +0000 [thread overview] Message-ID: <bug-109882-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109882 Bug ID: 109882 Summary: -fsanitize=thread #include <memory> transitively includes sanitizer/common_interface_defs.h Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: ed at catmur dot uk Target Milestone: --- Since 12.3.0, when compiled under tsan (-fsanitize=thread), #include <memory> transitively includes sanitizer/common_interface_defs.h: #include <memory> #if defined SANITIZER_COMMON_INTERFACE_DEFS_H #error :( #endif This is problematic for us because sanitizer/common_interface_defs.h has #define __has_feature(x) 0 https://github.com/gcc-mirror/gcc/blame/5d85b5d649fff675ff00adcc99371bccf4ef5944/libsanitizer/include/sanitizer/common_interface_defs.h#L20 which makes our sanitizer detector incorrectly believe that __has_feature is available and that tsan is not in fact present since __has_feature(thread_sanitizer) evaluates to 0. We will fix the order of checks to put `#ifdef __SANITIZE_THREAD__` first but thought we should probably report this to help other users.
next reply other threads:[~2023-05-16 23:14 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-16 23:14 ed at catmur dot uk [this message] 2023-05-16 23:26 ` [Bug libstdc++/109882] " pinskia at gcc dot gnu.org 2023-05-16 23:27 ` [Bug sanitizer/109882] " pinskia at gcc dot gnu.org 2023-05-16 23:28 ` pinskia at gcc dot gnu.org 2023-05-16 23:45 ` redi at gcc dot gnu.org 2023-05-17 8:19 ` [Bug sanitizer/109882] sanitizer/common_interface_defs.h bogusly defines __has_feature redi at gcc dot gnu.org 2023-05-17 8:28 ` jakub at gcc dot gnu.org 2023-05-17 11:34 ` redi at gcc dot gnu.org 2023-05-18 12:50 ` redi at gcc dot gnu.org 2023-09-18 22:34 ` redi at gcc dot gnu.org 2023-11-09 10:05 ` redi at gcc dot gnu.org 2023-11-09 10:12 ` sjames at gcc dot gnu.org 2023-11-15 11:57 ` sjames at gcc dot gnu.org 2023-11-15 12:36 ` redi at gcc dot gnu.org 2023-11-15 12:37 ` redi at gcc dot gnu.org 2023-11-15 12:40 ` jakub at gcc dot gnu.org 2023-11-15 12:47 ` sjames at gcc dot gnu.org 2023-11-27 11:08 ` acoplan 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-109882-4@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).