Implement intrusive ptr (#6129)

* Use intrusive ptr for JSON.
This commit is contained in:
Jiaming Yuan
2020-09-20 20:07:16 +08:00
committed by GitHub
parent e319b63f9e
commit a069a21e03
4 changed files with 365 additions and 9 deletions

View File

@@ -134,16 +134,18 @@ One can also run all unit test using ctest tool which provides higher flexibilit
Sanitizers: Detect memory errors and data races
***********************************************
By default, sanitizers are bundled in GCC and Clang/LLVM. One can enable
sanitizers with GCC >= 4.8 or LLVM >= 3.1, But some distributions might package
sanitizers separately. Here is a list of supported sanitizers with
corresponding library names:
By default, sanitizers are bundled in GCC and Clang/LLVM. One can enable sanitizers with
GCC >= 4.8 or LLVM >= 3.1, But some distributions might package sanitizers separately.
Here is a list of supported sanitizers with corresponding library names:
- Address sanitizer: libasan
- Undefined sanitizer: libubsan
- Leak sanitizer: liblsan
- Thread sanitizer: libtsan
Memory sanitizer is exclusive to LLVM, hence not supported in XGBoost.
Memory sanitizer is exclusive to LLVM, hence not supported in XGBoost. With latest
compilers like gcc-9, when sanitizer flags are specified, the compiler driver should be
able to link the runtime libraries automatically.
How to build XGBoost with sanitizers
====================================
@@ -175,5 +177,15 @@ environment variable:
ASAN_OPTIONS=protect_shadow_gap=0 ${BUILD_DIR}/testxgboost
For details, please consult `official documentation <https://github.com/google/sanitizers/wiki>`_ for sanitizers.
Other sanitizer runtime options
===============================
By default undefined sanitizer doesn't print out the backtrace. You can enable it by
exporting environment variable:
.. code-block::
UBSAN_OPTIONS=print_stacktrace=1 ${BUILD_DIR}/testxgboost
For details, please consult `official documentation <https://github.com/google/sanitizers/wiki>`_ for sanitizers.