mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
There's some unfortunate ODR violations that get dianosed with GCC but not Clang
for static inline constexpr variables defined inside the class body:
template<typename T>
struct static_const
{
static JSON_INLINE_VARIABLE constexpr T value{};
};
This can be ignored pretty much. There is the same problem for std::piecewise_construct:
http://lists.boost.org/Archives/boost/2007/06/123353.php
==2455704==ERROR: AddressSanitizer: odr-violation (0x7efddc460e20):
[1] size=1 'value' /nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3/include/nlohmann/detail/meta/cpp_future.hpp:156:45 in /nix/store/pkmljfq97a83dbanr0n64zbm8cyhna33-nix-store-2.33.0pre/lib/libnixstore.so.2.33.0
[2] size=1 'value' /nix/store/235hvgzcbl06fxy53515q8sr6lljvf68-nlohmann_json-3.11.3/include/nlohmann/detail/meta/cpp_future.hpp:156:45 in /nix/store/gbjpkjj0g8vk20fzlyrwj491gwp6g1qw-nix-util-2.33.0pre/lib/libnixutil.so.2.33.0
6 lines
293 B
C++
6 lines
293 B
C++
extern "C" [[gnu::retain, gnu::weak]] const char * __asan_default_options()
|
|
{
|
|
// We leak a bunch of memory knowingly on purpose. It's not worthwhile to
|
|
// diagnose that memory being leaked for now.
|
|
return "abort_on_error=1:print_summary=1:detect_leaks=0:detect_odr_violation=0";
|
|
}
|