[Bug sanitizer/109882] -fsanitize=thread #include <memory> transitively includes sanitizer/common_interface_defs.h
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 16 23:45:10 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109882
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-05-16
Ever confirmed|0 |1
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The header is included since r13-2677-g0abc63a5ea4550 (and
r12-9342-g0cec4e9cd44e25 on the branch), and not including it would mean not
being able to annotate atomic<shared_ptr<T>>.
I agree with Andrew, this is a bug in libsanitizer. The correct way to use
__has_feature in a public header is to test with #ifdef __has_feature not to
define the fallback definition.
More information about the Gcc-bugs
mailing list