From bd5a2bba8f4238db2e06c99ac808fc8327dec2a0 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Mon, 7 May 2018 11:12:21 -0700 Subject: [PATCH] - 45690246da1e36acde86c941b68aad2248b16ea7 Import of CCTZ from Github. by Abseil Team - ff3cf0774f9903fb62f7012af24c0901286a1b80 Fix -Wunreachable-code-return warning (from clang 6.0) in by Derek Mauro - b41ca35e56f6137cf6672d16613a7edfd6107e27 Include port.h to drag in platform-specific configurations. by Abseil Team - 5d50b728937d245caedaa2208a97d52f55040134 Set the default symbolizer for Mutex deadlock detector re... by Derek Mauro GitOrigin-RevId: 45690246da1e36acde86c941b68aad2248b16ea7 Change-Id: I2c6a87e9090657ff3fb456f3409bfdc24b8b765a --- absl/debugging/failure_signal_handler.cc | 3 ++- absl/debugging/internal/symbolize.h | 1 + absl/synchronization/BUILD.bazel | 1 + absl/synchronization/CMakeLists.txt | 3 ++- absl/synchronization/mutex.cc | 4 +++- absl/synchronization/mutex.h | 6 ++++++ absl/time/internal/cctz/testdata/version | 2 +- .../cctz/testdata/zoneinfo/Africa/Windhoek | Bin 1030 -> 988 bytes .../cctz/testdata/zoneinfo/Asia/Pyongyang | Bin 272 -> 267 bytes .../cctz/testdata/zoneinfo/Europe/Bratislava | Bin 2272 -> 2338 bytes .../cctz/testdata/zoneinfo/Europe/Prague | Bin 2272 -> 2338 bytes 11 files changed, 16 insertions(+), 4 deletions(-) diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc index 3de45f0bb..3aaa29f70 100644 --- a/absl/debugging/failure_signal_handler.cc +++ b/absl/debugging/failure_signal_handler.cc @@ -162,8 +162,9 @@ static int MaybeSetupAlternateStack() { #ifndef _WIN32 ABSL_ATTRIBUTE_UNUSED static const bool kOnce = SetupAlternateStackOnce(); return SA_ONSTACK; -#endif +#else return 0; +#endif } #ifdef ABSL_HAVE_SIGACTION diff --git a/absl/debugging/internal/symbolize.h b/absl/debugging/internal/symbolize.h index 7ae13839b..8d926fec4 100644 --- a/absl/debugging/internal/symbolize.h +++ b/absl/debugging/internal/symbolize.h @@ -20,6 +20,7 @@ #include #include +#include "absl/base/port.h" // Needed for string vs std::string #ifdef ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE #error ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE cannot be directly set diff --git a/absl/synchronization/BUILD.bazel b/absl/synchronization/BUILD.bazel index 69f9c81f6..05376903f 100644 --- a/absl/synchronization/BUILD.bazel +++ b/absl/synchronization/BUILD.bazel @@ -77,6 +77,7 @@ cc_library( "//absl/base:dynamic_annotations", "//absl/base:malloc_internal", "//absl/debugging:stacktrace", + "//absl/debugging:symbolize", "//absl/time", ], ) diff --git a/absl/synchronization/CMakeLists.txt b/absl/synchronization/CMakeLists.txt index c8f84faf8..6886c1ca6 100644 --- a/absl/synchronization/CMakeLists.txt +++ b/absl/synchronization/CMakeLists.txt @@ -44,7 +44,8 @@ list(APPEND SYNCHRONIZATION_SRC "notification.cc" "mutex.cc" ) -set(SYNCHRONIZATION_PUBLIC_LIBRARIES absl::base absl::time) + +set(SYNCHRONIZATION_PUBLIC_LIBRARIES absl::base absl::stacktrace absl::symbolize absl::time) absl_library( TARGET diff --git a/absl/synchronization/mutex.cc b/absl/synchronization/mutex.cc index 33f92d8fa..bd54a4dc2 100644 --- a/absl/synchronization/mutex.cc +++ b/absl/synchronization/mutex.cc @@ -50,6 +50,7 @@ #include "absl/base/internal/thread_identity.h" #include "absl/base/port.h" #include "absl/debugging/stacktrace.h" +#include "absl/debugging/symbolize.h" #include "absl/synchronization/internal/graphcycles.h" #include "absl/synchronization/internal/per_thread_sem.h" #include "absl/time/time.h" @@ -111,7 +112,8 @@ ABSL_CONST_INIT absl::base_internal::AtomicHook< ABSL_CONST_INIT absl::base_internal::AtomicHook< void (*)(const char *msg, const void *cv)> cond_var_tracer; ABSL_CONST_INIT absl::base_internal::AtomicHook< - bool (*)(const void *pc, char *out, int out_size)> symbolizer; + bool (*)(const void *pc, char *out, int out_size)> + symbolizer(absl::Symbolize); } // namespace diff --git a/absl/synchronization/mutex.h b/absl/synchronization/mutex.h index c4e026f9b..368684bf2 100644 --- a/absl/synchronization/mutex.h +++ b/absl/synchronization/mutex.h @@ -979,6 +979,12 @@ void RegisterCondVarTracer(void (*fn)(const char *msg, const void *cv)); // to 'out.' // // This has the same memory ordering concerns as RegisterMutexProfiler() above. +// +// DEPRECATED: The default symbolizer function is absl::Symbolize() and the +// ability to register a different hook for symbolizing stack traces will be +// removed on or after 2023-05-01. +ABSL_DEPRECATED("absl::RegisterSymbolizer() is deprecated and will be removed " + "on or after 2023-05-01") void RegisterSymbolizer(bool (*fn)(const void *pc, char *out, int out_size)); // EnableMutexInvariantDebugging() diff --git a/absl/time/internal/cctz/testdata/version b/absl/time/internal/cctz/testdata/version index 05c3ec280..fe86b5cc8 100644 --- a/absl/time/internal/cctz/testdata/version +++ b/absl/time/internal/cctz/testdata/version @@ -1 +1 @@ -2018d-2-g8d1dac0 +2018e-2-g99dd695 diff --git a/absl/time/internal/cctz/testdata/zoneinfo/Africa/Windhoek b/absl/time/internal/cctz/testdata/zoneinfo/Africa/Windhoek index 358f11e329bf54d9cf9fb534bbeaf460aa04900f..f5d40bafc3912fe7c65f47cb63e52fc6b9b932c0 100644 GIT binary patch delta 318 zcmZqUxWhg{T$GK0fdPa;z!Zo<}^RA!nH1HfdPa;z!Zo*Y#waj~ zgGdH`AKwrLZ39DN1BPJ7;1C99#}I~aFa~mfU~)dA3W`I_U=G>5f^jP&c~0>p%PAn| MzyTM~p}Iy~08nfl2><{9 diff --git a/absl/time/internal/cctz/testdata/zoneinfo/Asia/Pyongyang b/absl/time/internal/cctz/testdata/zoneinfo/Asia/Pyongyang index de5c2b156653e142ebf086402d9ba1ee13da3cd3..dc24926e80f24b564669b5979736a191114a998d 100644 GIT binary patch literal 267 zcmWHE%1kq2zyK^j5fBCeHXsJEc^ZI3_w|o+COs4TaY;Y1AoLtlLDZX?3I;|dW=3WP zhSDcM1q|gKAk}pf7&yQri;r&zgLiNUgBK9PKnMx8{(x%w4+J3FK{Ut(AR6QfkTl38 PAeubaZ~>jCYsm!wM71|t literal 272 zcmWHE%1kq2zyPd35fBCe7@Ma7$mzcRan7V?Vm~hFCl-XBV=7=^WMXDyU?_b8Qd!=? zz{0>#H-UizOaj>;5g*?W2Jhey1}`8+fDjTa{sGnY9|%AW0MQ^vfM}3IK++UBh70IE KT?;E?11cWkZLfP3}uT>PG&B(20G_I5P+Nnrh(1^(IBUR zXpr+jG{}iy8t6zPU42ARJCS0uiFK}t0zrf`NnF&`sF9~d{VPdLh zVTM8`R<;3vjBJw`nHA(@6c||;82AJjI0Jk`7@S>$K|~116O2GG*_&BTlmo~CVGx)A z#2~id>AZ XftCXe16t1O1GF670T37b<4^$r{Bu97 diff --git a/absl/time/internal/cctz/testdata/zoneinfo/Europe/Prague b/absl/time/internal/cctz/testdata/zoneinfo/Europe/Prague index 4eabe5c81bd1eaf255fe09cfe72f10f61762fd5f..ba82f311b74838347de6dda464a22e95a16e0408 100644 GIT binary patch delta 396 zcmaDLxJYP%_+&q39?ppj3=AAVEI3ieP`*i3;9`-Oz{N$I6D}pO3tVoHnQ+DPlE9V8 zTNJJ`6)9{iU}EBBWMO7uWnu=B%q&ck899nH*x1?F85npwfTl3WC@``xFz^X5aH6sq z7#Mjc3ouLay8DKJ)G;!G&}0KcWkZLfP3}uT>PG&B(20G_I5P+Nnrh(1^(IBUR zXpr+jG{}iy8t6zPU42ARJCS0uiFK}t0zrf`NnF&`sF9~d{VPdLh zVTM8`R<;3vjBJw`nHA(@6c||;82AJjI0Jk`7@S>$K|~116O2GG*_&BTlmo~CVGx)A z#2~id>AZ XftCXe16t1O1GF670T37b<4^$r{Bu97