aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/leak_check.h
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2022-08-31 10:58:13 +0300
committerthegeorg <thegeorg@yandex-team.com>2022-08-31 10:58:13 +0300
commitdb58955e8e90ba21f2d9b82fa9af131f40ff1c6f (patch)
tree09c50f24532f69bc07d3ff991cf581c76ef5482a /contrib/restricted/abseil-cpp-tstring/y_absl/debugging/leak_check.h
parent665b832313a6f533823ec2187458f2b33a70b093 (diff)
downloadydb-db58955e8e90ba21f2d9b82fa9af131f40ff1c6f.tar.gz
Update contrib/restricted/abseil-cpp-tstring to 20220623.0
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/debugging/leak_check.h')
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/debugging/leak_check.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/leak_check.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/leak_check.h
index 154fe4805d..17256e0c03 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/leak_check.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/leak_check.h
@@ -24,7 +24,24 @@
// Note: this leak checking API is not yet supported in MSVC.
// Leak checking is enabled by default in all ASan builds.
//
-// See https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer
+// https://clang.llvm.org/docs/LeakSanitizer.html
+// https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer
+//
+// GCC and Clang both automatically enable LeakSanitizer when AddressSanitizer
+// is enabled. To use the mode, simply pass `-fsanitize=address` to both the
+// compiler and linker. An example Bazel command could be
+//
+// $ bazel test --copt=-fsanitize=address --linkopt=-fsanitize=address ...
+//
+// GCC and Clang auto support a standalone LeakSanitizer mode (a mode which does
+// not also use AddressSanitizer). To use the mode, simply pass
+// `-fsanitize=leak` to both the compiler and linker. Since GCC does not
+// currently provide a way of detecting this mode at compile-time, GCC users
+// must also pass -DLEAK_SANIITIZER to the compiler. An example Bazel command
+// could be
+//
+// $ bazel test --copt=-DLEAK_SANITIZER --copt=-fsanitize=leak
+// --linkopt=-fsanitize=leak ...
//
// -----------------------------------------------------------------------------
#ifndef Y_ABSL_DEBUGGING_LEAK_CHECK_H_