mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
b9b7a1091b
- We previously compiled libcxx with _LIBCPP_DEBUG=0. In old libcxx versions, this (surprisingly) enabled the basic debug mode [1]. - In libcxx 15 (the version we are currently using), _LIBCPP_DEBUG=0 does nothing [2], the replacement is _LIBCPP_ENABLE_DEBUG_MODE=1. - The debug mode is only enabled in Debug builds. Their docs say the extra check change complexity guarantees + the asserts crash which we don't want in Release builds. The debug mode detects issues like in [3]. Crashes look like this (for example) ``` /data/ch/contrib/llvm-project/libcxx/include/__iterator/wrap_iter.h:99: assertion ::std::__libcpp_is_constant_evaluated() || (__get_const_db()->__dereferenceable(this)) failed: Attempted to increment a non-incrementable iteratorAborted (core dumped) ``` - I had to mute some new clang-tidy warnings in places that deal with container iterators. They got heavier and copy-by-value now yields a warning, e.g. for (auto it : iterators) /// <-- warning [...] [1] https://releases.llvm.org/12.0.0/projects/libcxx/docs/DesignDocs/DebugMode.html [2] https://releases.llvm.org/15.0.0/projects/libcxx/docs/DesignDocs/DebugMode.html [3] https://github.com/llvm/llvm-project/blob/main/libcxx/test/support/container_debug_tests.h |
||
---|---|---|
.. | ||
darwin | ||
freebsd | ||
linux | ||
toolchain | ||
add_warning.cmake | ||
arch.cmake | ||
autogenerated_versions.txt | ||
ccache.cmake | ||
check_flags.cmake | ||
clang_tidy.cmake | ||
cpu_features.cmake | ||
cxx.cmake | ||
dbms_glob_sources.cmake | ||
git.cmake | ||
limit_jobs.cmake | ||
print_flags.cmake | ||
sanitize_targets.cmake | ||
sanitize.cmake | ||
split_debug_symbols.cmake | ||
target.cmake | ||
tools.cmake | ||
unwind.cmake | ||
utils.cmake | ||
version.cmake | ||
warnings.cmake | ||
xray_instrumentation.cmake |