diff options
author | arcadia-devtools <[email protected]> | 2022-03-04 14:03:06 +0300 |
---|---|---|
committer | arcadia-devtools <[email protected]> | 2022-03-04 14:03:06 +0300 |
commit | b61be8e632d1cafa8afb229ea0a5b6117ca7125b (patch) | |
tree | 96a36f21d4064f32d1912cbc85e4135788ff70b3 /contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal | |
parent | 7ce58bf82abf75fdc15c2e6fa3aceadcfecfdca1 (diff) |
intermediate changes
ref:c67faec740b4d59ed47c6dfdc7076c904650af60
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal')
22 files changed, 197 insertions, 197 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/address_is_readable.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/address_is_readable.cc index df217335eab..669d81f878f 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/address_is_readable.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/address_is_readable.cc @@ -20,14 +20,14 @@ #if !defined(__linux__) || defined(__ANDROID__) namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // On platforms other than Linux, just return true. bool AddressIsReadable(const void* /* addr */) { return true; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl #else @@ -44,13 +44,13 @@ ABSL_NAMESPACE_END #include "y_absl/base/internal/raw_logging.h" namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // Pack a pid and two file descriptors into a 64-bit word, // using 16, 24, and 24 bits for each respectively. static uint64_t Pack(uint64_t pid, uint64_t read_fd, uint64_t write_fd) { - ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, + Y_ABSL_RAW_CHECK((read_fd >> 24) == 0 && (write_fd >> 24) == 0, "fd out of range"); return (pid << 48) | ((read_fd & 0xffffff) << 24) | (write_fd & 0xffffff); } @@ -93,7 +93,7 @@ bool AddressIsReadable(const void *addr) { int p[2]; // new pipe if (pipe(p) != 0) { - ABSL_RAW_LOG(FATAL, "Failed to create pipe, errno=%d", errno); + Y_ABSL_RAW_LOG(FATAL, "Failed to create pipe, errno=%d", errno); } fcntl(p[0], F_SETFD, FD_CLOEXEC); fcntl(p[1], F_SETFD, FD_CLOEXEC); @@ -133,7 +133,7 @@ bool AddressIsReadable(const void *addr) { } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl #endif diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/address_is_readable.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/address_is_readable.h index 279dcc640bd..bbda33123f7 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/address_is_readable.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/address_is_readable.h @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ -#define ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ #include "y_absl/base/config.h" namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // Return whether the byte at *addr is readable, without faulting. @@ -26,7 +26,7 @@ namespace debugging_internal { bool AddressIsReadable(const void *addr); } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/demangle.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/demangle.cc index 0a4daa2f5ce..e9319575cb1 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/demangle.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/demangle.cc @@ -24,7 +24,7 @@ #include <limits> namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { typedef struct { @@ -1955,5 +1955,5 @@ bool Demangle(const char *mangled, char *out, int out_size) { } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/demangle.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/demangle.h index a9b42edb451..28d4dfb0e9d 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/demangle.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/demangle.h @@ -50,13 +50,13 @@ // C++ ABI in the future. // -#ifndef ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ -#define ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ #include "y_absl/base/config.h" namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // Demangle `mangled`. On success, return true and write the @@ -65,7 +65,7 @@ namespace debugging_internal { bool Demangle(const char *mangled, char *out, int out_size); } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/elf_mem_image.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/elf_mem_image.cc index ba4bbc3855a..1df9cca1b6d 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/elf_mem_image.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/elf_mem_image.cc @@ -17,7 +17,7 @@ #include "y_absl/debugging/internal/elf_mem_image.h" -#ifdef ABSL_HAVE_ELF_MEM_IMAGE // defined in elf_mem_image.h +#ifdef Y_ABSL_HAVE_ELF_MEM_IMAGE // defined in elf_mem_image.h #include <string.h> #include <cassert> @@ -39,7 +39,7 @@ #define VERSYM_VERSION 0x7fff namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { namespace { @@ -55,11 +55,11 @@ int ElfType(const ElfW(Sym) *symbol) { return ELF64_ST_TYPE(symbol->st_info); } #else const int kElfClass = -1; int ElfBind(const ElfW(Sym) *) { - ABSL_RAW_LOG(FATAL, "Unexpected word size"); + Y_ABSL_RAW_LOG(FATAL, "Unexpected word size"); return 0; } int ElfType(const ElfW(Sym) *) { - ABSL_RAW_LOG(FATAL, "Unexpected word size"); + Y_ABSL_RAW_LOG(FATAL, "Unexpected word size"); return 0; } #endif @@ -82,7 +82,7 @@ const T *GetTableElement(const ElfW(Ehdr) * ehdr, ElfW(Off) table_offset, const int ElfMemImage::kInvalidBaseSentinel = 0; ElfMemImage::ElfMemImage(const void *base) { - ABSL_RAW_CHECK(base != kInvalidBase, "bad pointer"); + Y_ABSL_RAW_CHECK(base != kInvalidBase, "bad pointer"); Init(base); } @@ -95,17 +95,17 @@ int ElfMemImage::GetNumSymbols() const { } const ElfW(Sym) *ElfMemImage::GetDynsym(int index) const { - ABSL_RAW_CHECK(index < GetNumSymbols(), "index out of range"); + Y_ABSL_RAW_CHECK(index < GetNumSymbols(), "index out of range"); return dynsym_ + index; } const ElfW(Versym) *ElfMemImage::GetVersym(int index) const { - ABSL_RAW_CHECK(index < GetNumSymbols(), "index out of range"); + Y_ABSL_RAW_CHECK(index < GetNumSymbols(), "index out of range"); return versym_ + index; } const ElfW(Phdr) *ElfMemImage::GetPhdr(int index) const { - ABSL_RAW_CHECK(index < ehdr_->e_phnum, "index out of range"); + Y_ABSL_RAW_CHECK(index < ehdr_->e_phnum, "index out of range"); return GetTableElement<ElfW(Phdr)>(ehdr_, ehdr_->e_phoff, ehdr_->e_phentsize, @@ -113,7 +113,7 @@ const ElfW(Phdr) *ElfMemImage::GetPhdr(int index) const { } const char *ElfMemImage::GetDynstr(ElfW(Word) offset) const { - ABSL_RAW_CHECK(offset < strsize_, "offset out of range"); + Y_ABSL_RAW_CHECK(offset < strsize_, "offset out of range"); return dynstr_ + offset; } @@ -122,12 +122,12 @@ const void *ElfMemImage::GetSymAddr(const ElfW(Sym) *sym) const { // Symbol corresponds to "special" (e.g. SHN_ABS) section. return reinterpret_cast<const void *>(sym->st_value); } - ABSL_RAW_CHECK(link_base_ < sym->st_value, "symbol out of range"); + Y_ABSL_RAW_CHECK(link_base_ < sym->st_value, "symbol out of range"); return GetTableElement<char>(ehdr_, 0, 1, sym->st_value - link_base_); } const ElfW(Verdef) *ElfMemImage::GetVerdef(int index) const { - ABSL_RAW_CHECK(0 <= index && static_cast<size_t>(index) <= verdefnum_, + Y_ABSL_RAW_CHECK(0 <= index && static_cast<size_t>(index) <= verdefnum_, "index out of range"); const ElfW(Verdef) *version_definition = verdef_; while (version_definition->vd_ndx < index && version_definition->vd_next) { @@ -146,7 +146,7 @@ const ElfW(Verdaux) *ElfMemImage::GetVerdefAux( } const char *ElfMemImage::GetVerstr(ElfW(Word) offset) const { - ABSL_RAW_CHECK(offset < strsize_, "offset out of range"); + Y_ABSL_RAW_CHECK(offset < strsize_, "offset out of range"); return dynstr_ + offset; } @@ -176,14 +176,14 @@ void ElfMemImage::Init(const void *base) { } switch (base_as_char[EI_DATA]) { case ELFDATA2LSB: { -#ifndef ABSL_IS_LITTLE_ENDIAN +#ifndef Y_ABSL_IS_LITTLE_ENDIAN assert(false); return; #endif break; } case ELFDATA2MSB: { -#ifndef ABSL_IS_BIG_ENDIAN +#ifndef Y_ABSL_IS_BIG_ENDIAN assert(false); return; #endif @@ -338,7 +338,7 @@ ElfMemImage::SymbolIterator ElfMemImage::end() const { void ElfMemImage::SymbolIterator::Update(int increment) { const ElfMemImage *image = reinterpret_cast<const ElfMemImage *>(image_); - ABSL_RAW_CHECK(image->IsPresent() || increment == 0, ""); + Y_ABSL_RAW_CHECK(image->IsPresent() || increment == 0, ""); if (!image->IsPresent()) { return; } @@ -349,7 +349,7 @@ void ElfMemImage::SymbolIterator::Update(int increment) { } const ElfW(Sym) *symbol = image->GetDynsym(index_); const ElfW(Versym) *version_symbol = image->GetVersym(index_); - ABSL_RAW_CHECK(symbol && version_symbol, ""); + Y_ABSL_RAW_CHECK(symbol && version_symbol, ""); const char *const symbol_name = image->GetDynstr(symbol->st_name); const ElfW(Versym) version_index = version_symbol[0] & VERSYM_VERSION; const ElfW(Verdef) *version_definition = nullptr; @@ -364,7 +364,7 @@ void ElfMemImage::SymbolIterator::Update(int increment) { if (version_definition) { // I am expecting 1 or 2 auxiliary entries: 1 for the version itself, // optional 2nd if the version has a parent. - ABSL_RAW_CHECK( + Y_ABSL_RAW_CHECK( version_definition->vd_cnt == 1 || version_definition->vd_cnt == 2, "wrong number of entries"); const ElfW(Verdaux) *version_aux = image->GetVerdefAux(version_definition); @@ -377,7 +377,7 @@ void ElfMemImage::SymbolIterator::Update(int increment) { } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_HAVE_ELF_MEM_IMAGE +#endif // Y_ABSL_HAVE_ELF_MEM_IMAGE diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/elf_mem_image.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/elf_mem_image.h index 13a6b2e664c..c19c0e9f8e1 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/elf_mem_image.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/elf_mem_image.h @@ -16,8 +16,8 @@ // Allow dynamic symbol lookup for in-memory Elf images. -#ifndef ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ -#define ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ // Including this will define the __GLIBC__ macro if glibc is being // used. @@ -27,16 +27,16 @@ // Maybe one day we can rewrite this file not to require the elf // symbol extensions in glibc, but for right now we need them. -#ifdef ABSL_HAVE_ELF_MEM_IMAGE -#error ABSL_HAVE_ELF_MEM_IMAGE cannot be directly set +#ifdef Y_ABSL_HAVE_ELF_MEM_IMAGE +#error Y_ABSL_HAVE_ELF_MEM_IMAGE cannot be directly set #endif #if defined(__ELF__) && !defined(__native_client__) && !defined(__asmjs__) && \ !defined(__wasm__) -#define ABSL_HAVE_ELF_MEM_IMAGE 1 +#define Y_ABSL_HAVE_ELF_MEM_IMAGE 1 #endif -#ifdef ABSL_HAVE_ELF_MEM_IMAGE +#ifdef Y_ABSL_HAVE_ELF_MEM_IMAGE #include <link.h> // for ElfW @@ -45,7 +45,7 @@ #endif namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // An in-memory ELF image (may not exist on disk). @@ -130,9 +130,9 @@ class ElfMemImage { }; } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_HAVE_ELF_MEM_IMAGE +#endif // Y_ABSL_HAVE_ELF_MEM_IMAGE -#endif // ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/examine_stack.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/examine_stack.cc index c59d92b6a38..edc926cafd6 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/examine_stack.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/examine_stack.cc @@ -34,7 +34,7 @@ #include "y_absl/debugging/symbolize.h" namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // Returns the program counter from signal context, nullptr if @@ -53,7 +53,7 @@ void* GetProgramCounter(void* vuc) { #elif defined(__hppa__) return reinterpret_cast<void*>(context->uc_mcontext.sc_iaoq[0]); #elif defined(__i386__) - if (14 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) + if (14 < Y_ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) return reinterpret_cast<void*>(context->uc_mcontext.gregs[14]); #elif defined(__ia64__) return reinterpret_cast<void*>(context->uc_mcontext.sc_ip); @@ -78,7 +78,7 @@ void* GetProgramCounter(void* vuc) { #elif defined(__sparc__) && defined(__arch64__) return reinterpret_cast<void*>(context->uc_mcontext.mc_gregs[19]); #elif defined(__x86_64__) - if (16 < ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) + if (16 < Y_ABSL_ARRAYSIZE(context->uc_mcontext.gregs)) return reinterpret_cast<void*>(context->uc_mcontext.gregs[16]); #elif defined(__e2k__) return reinterpret_cast<void*>(context->uc_mcontext.cr0_hi); @@ -199,5 +199,5 @@ void DumpPCAndFrameSizesAndStackTrace( } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/examine_stack.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/examine_stack.h index 32892a11504..4ac2c8358ad 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/examine_stack.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/examine_stack.h @@ -14,13 +14,13 @@ // limitations under the License. // -#ifndef ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_ -#define ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_ #include "y_absl/base/config.h" namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // Returns the program counter from signal context, or nullptr if @@ -36,7 +36,7 @@ void DumpPCAndFrameSizesAndStackTrace( void (*writerfn)(const char*, void*), void* writerfn_arg); } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_EXAMINE_STACK_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stack_consumption.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stack_consumption.h index 80137ad0eb5..f527eeb1558 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stack_consumption.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stack_consumption.h @@ -15,22 +15,22 @@ // Helper function for measuring stack consumption of signal handlers. -#ifndef ABSL_DEBUGGING_INTERNAL_STACK_CONSUMPTION_H_ -#define ABSL_DEBUGGING_INTERNAL_STACK_CONSUMPTION_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACK_CONSUMPTION_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACK_CONSUMPTION_H_ #include "y_absl/base/config.h" // The code in this module is not portable. // Use this feature test macro to detect its availability. -#ifdef ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION -#error ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION cannot be set directly +#ifdef Y_ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION +#error Y_ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION cannot be set directly #elif !defined(__APPLE__) && !defined(_WIN32) && \ (defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || \ defined(__aarch64__) || defined(__riscv)) -#define ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION 1 +#define Y_ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION 1 namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // Returns the stack consumption in bytes for the code exercised by @@ -42,9 +42,9 @@ namespace debugging_internal { int GetSignalHandlerStackConsumption(void (*signal_handler)(int)); } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION +#endif // Y_ABSL_INTERNAL_HAVE_DEBUGGING_STACK_CONSUMPTION -#endif // ABSL_DEBUGGING_INTERNAL_STACK_CONSUMPTION_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACK_CONSUMPTION_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_aarch64-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_aarch64-inl.inc index 700f6074885..e225b4dd183 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_aarch64-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_aarch64-inl.inc @@ -1,5 +1,5 @@ -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ // Generate stack tracer for aarch64 @@ -25,7 +25,7 @@ static const uintptr_t kUnknownFrameSize = 0; // Returns the address of the VDSO __kernel_rt_sigreturn function, if present. static const unsigned char* GetKernelRtSigreturnAddress() { constexpr uintptr_t kImpossibleAddress = 1; - ABSL_CONST_INIT static std::atomic<uintptr_t> memoized{kImpossibleAddress}; + Y_ABSL_CONST_INIT static std::atomic<uintptr_t> memoized{kImpossibleAddress}; uintptr_t address = memoized.load(std::memory_order_relaxed); if (address != kImpossibleAddress) { return reinterpret_cast<const unsigned char*>(address); @@ -33,7 +33,7 @@ static const unsigned char* GetKernelRtSigreturnAddress() { address = reinterpret_cast<uintptr_t>(nullptr); -#ifdef ABSL_HAVE_VDSO_SUPPORT +#ifdef Y_ABSL_HAVE_VDSO_SUPPORT y_absl::debugging_internal::VDSOSupport vdso; if (vdso.IsPresent()) { y_absl::debugging_internal::VDSOSupport::SymbolInfo symbol_info; @@ -77,8 +77,8 @@ static inline uintptr_t ComputeStackFrameSize(const T* low, // checks (the strictness of which is controlled by the boolean parameter // "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. template<bool STRICT_UNWINDING, bool WITH_CONTEXT> -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. static void **NextStackFrame(void **old_frame_pointer, const void *uc) { void **new_frame_pointer = reinterpret_cast<void**>(*old_frame_pointer); bool check_frame_size = true; @@ -128,8 +128,8 @@ static void **NextStackFrame(void **old_frame_pointer, const void *uc) { } template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT> -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, const void *ucp, int *min_dropped_frames) { #ifdef __GNUC__ @@ -187,13 +187,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return true; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_arm-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_arm-inl.inc index b73307120ee..d735d1f9339 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_arm-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_arm-inl.inc @@ -14,8 +14,8 @@ // // This is inspired by Craig Silverstein's PowerPC stacktrace code. -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ #include <cstdint> @@ -122,13 +122,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return false; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_config.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_config.h index 7ba212ab03f..d93c3f1dd99 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_config.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_config.h @@ -13,32 +13,32 @@ * See the License for the specific language governing permissions and * limitations under the License. - * Defines ABSL_STACKTRACE_INL_HEADER to the *-inl.h containing + * Defines Y_ABSL_STACKTRACE_INL_HEADER to the *-inl.h containing * actual unwinder implementation. * This header is "private" to stacktrace.cc. * DO NOT include it into any other files. */ -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ #include "y_absl/base/config.h" -#if defined(ABSL_STACKTRACE_INL_HEADER) -#error ABSL_STACKTRACE_INL_HEADER cannot be directly set +#if defined(Y_ABSL_STACKTRACE_INL_HEADER) +#error Y_ABSL_STACKTRACE_INL_HEADER cannot be directly set #elif defined(_WIN32) -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_win32-inl.inc" #elif defined(__APPLE__) -#ifdef ABSL_HAVE_THREAD_LOCAL +#ifdef Y_ABSL_HAVE_THREAD_LOCAL // Thread local support required for UnwindImpl. -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_generic-inl.inc" -#endif // defined(ABSL_HAVE_THREAD_LOCAL) +#endif // defined(Y_ABSL_HAVE_THREAD_LOCAL) #elif defined(__EMSCRIPTEN__) -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_emscripten-inl.inc" #elif defined(__linux__) && !defined(__ANDROID__) @@ -47,31 +47,31 @@ (defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)) // Note: The libunwind-based implementation is not available to open-source // users. -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_libunwind-inl.inc" #define STACKTRACE_USES_LIBUNWIND 1 #elif defined(NO_FRAME_POINTER) && defined(__has_include) #if __has_include(<execinfo.h>) // Note: When using glibc this may require -funwind-tables to function properly. -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_generic-inl.inc" #endif // __has_include(<execinfo.h>) #elif defined(__i386__) || defined(__x86_64__) -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_x86-inl.inc" #elif defined(__ppc__) || defined(__PPC__) -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_powerpc-inl.inc" #elif defined(__aarch64__) -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_aarch64-inl.inc" #elif defined(__riscv) -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_riscv-inl.inc" #elif defined(__has_include) #if __has_include(<execinfo.h>) // Note: When using glibc this may require -funwind-tables to function properly. -#define ABSL_STACKTRACE_INL_HEADER \ +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_generic-inl.inc" #endif // __has_include(<execinfo.h>) #endif // defined(__has_include) @@ -79,9 +79,9 @@ #endif // defined(__linux__) && !defined(__ANDROID__) // Fallback to the empty implementation. -#if !defined(ABSL_STACKTRACE_INL_HEADER) -#define ABSL_STACKTRACE_INL_HEADER \ +#if !defined(Y_ABSL_STACKTRACE_INL_HEADER) +#define Y_ABSL_STACKTRACE_INL_HEADER \ "y_absl/debugging/internal/stacktrace_unimplemented-inl.inc" #endif -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_emscripten-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_emscripten-inl.inc index cdb55571344..ea86e5b0e10 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_emscripten-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_emscripten-inl.inc @@ -17,8 +17,8 @@ // Note: The glibc implementation may cause a call to malloc. // This can cause a deadlock in HeapProfiler. -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ #error #include <emscripten.h> @@ -49,7 +49,7 @@ static __thread int recursive = 0; static std::atomic<bool> disable_stacktraces(true); // Disabled until healthy. // Waiting until static initializers run seems to be late enough. // This file is included into stacktrace.cc so this will only run once. -ABSL_ATTRIBUTE_UNUSED static int stacktraces_enabler = []() { +Y_ABSL_ATTRIBUTE_UNUSED static int stacktraces_enabler = []() { // Check if we can even create stacktraces. If not, bail early and leave // disable_stacktraces set as-is. // clang-format off @@ -100,11 +100,11 @@ static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return true; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_generic-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_generic-inl.inc index fa623aa9548..fd0408fc24f 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_generic-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_generic-inl.inc @@ -17,8 +17,8 @@ // Note: The glibc implementation may cause a call to malloc. // This can cause a deadlock in HeapProfiler. -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ #include <execinfo.h> #include <atomic> @@ -45,7 +45,7 @@ static __thread int recursive = 0; static std::atomic<bool> disable_stacktraces(true); // Disabled until healthy. // Waiting until static initializers run seems to be late enough. // This file is included into stacktrace.cc so this will only run once. -ABSL_ATTRIBUTE_UNUSED static int stacktraces_enabler = []() { +Y_ABSL_ATTRIBUTE_UNUSED static int stacktraces_enabler = []() { void* unused_stack[1]; // Force the first backtrace to happen early to get the one-time shared lib // loading (allocation) out of the way. After the first call it is much safer @@ -96,13 +96,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return true; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_powerpc-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_powerpc-inl.inc index 1e41c4ebf2b..635c3dd2a69 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_powerpc-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_powerpc-inl.inc @@ -18,8 +18,8 @@ // https://www.linux-foundation.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#STACK // Linux has similar code: http://patchwork.ozlabs.org/linuxppc/patch?id=8882 -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ #if defined(__linux__) #include <asm/ptrace.h> // for PT_NIP. @@ -66,8 +66,8 @@ static inline void *StacktracePowerPCGetLR(void **sp) { // checks (the strictness of which is controlled by the boolean parameter // "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. template<bool STRICT_UNWINDING, bool IS_WITH_CONTEXT> -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. static void **NextStackFrame(void **old_sp, const void *uc) { void **new_sp = (void **) *old_sp; enum { kStackAlignment = 16 }; @@ -157,13 +157,13 @@ static void **NextStackFrame(void **old_sp, const void *uc) { } // This ensures that y_absl::GetStackTrace sets up the Link Register properly. -ABSL_ATTRIBUTE_NOINLINE static void AbslStacktracePowerPCDummyFunction() { - ABSL_BLOCK_TAIL_CALL_OPTIMIZATION(); +Y_ABSL_ATTRIBUTE_NOINLINE static void AbslStacktracePowerPCDummyFunction() { + Y_ABSL_BLOCK_TAIL_CALL_OPTIMIZATION(); } template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT> -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, const void *ucp, int *min_dropped_frames) { void **sp; @@ -241,13 +241,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return true; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_riscv-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_riscv-inl.inc index 8571c8cbfd6..4072ecc116f 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_riscv-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_riscv-inl.inc @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_RISCV_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_RISCV_INL_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_RISCV_INL_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_RISCV_INL_H_ // Generate stack trace for riscv @@ -42,7 +42,7 @@ static const uintptr_t kUnknownFrameSize = 0; // Returns the address of the VDSO __kernel_rt_sigreturn function, if present. static const unsigned char *GetKernelRtSigreturnAddress() { constexpr uintptr_t kImpossibleAddress = 0; - ABSL_CONST_INIT static std::atomic<uintptr_t> memoized(kImpossibleAddress); + Y_ABSL_CONST_INIT static std::atomic<uintptr_t> memoized(kImpossibleAddress); uintptr_t address = memoized.load(std::memory_order_relaxed); if (address != kImpossibleAddress) { return reinterpret_cast<const unsigned char *>(address); @@ -50,7 +50,7 @@ static const unsigned char *GetKernelRtSigreturnAddress() { address = reinterpret_cast<uintptr_t>(nullptr); -#if ABSL_HAVE_VDSO_SUPPORT +#if Y_ABSL_HAVE_VDSO_SUPPORT y_absl::debugging_internal::VDSOSupport vdso; if (vdso.IsPresent()) { y_absl::debugging_internal::VDSOSupport::SymbolInfo symbol_info; @@ -94,8 +94,8 @@ static inline uintptr_t ComputeStackFrameSize(const T *low, const T *high) { // strictness of which is controlled by the boolean parameter // "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. template <bool STRICT_UNWINDING, bool WITH_CONTEXT> -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. static void ** NextStackFrame(void **old_frame_pointer, const void *uc) { // . // . @@ -167,8 +167,8 @@ static void ** NextStackFrame(void **old_frame_pointer, const void *uc) { } template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT> -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count, const void *ucp, int *min_dropped_frames) { #if defined(__GNUC__) @@ -224,11 +224,11 @@ static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return true; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl #endif diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_unimplemented-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_unimplemented-inl.inc index 54dccaeae97..b1edc021bd1 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_unimplemented-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_unimplemented-inl.inc @@ -1,5 +1,5 @@ -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT> static int UnwindImpl(void** /* result */, int* /* sizes */, @@ -12,13 +12,13 @@ static int UnwindImpl(void** /* result */, int* /* sizes */, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return false; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_win32-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_win32-inl.inc index 69bd7e3f2f4..654990f2060 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_win32-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_win32-inl.inc @@ -34,8 +34,8 @@ // This code is inspired by a patch from David Vitek: // https://code.google.com/p/google-perftools/issues/detail?id=83 -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ #include <windows.h> // for GetProcAddress and GetModuleHandle #include <cassert> @@ -81,13 +81,13 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return false; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_x86-inl.inc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_x86-inl.inc index 8936f8ca70c..6e598bc3592 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_x86-inl.inc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/stacktrace_x86-inl.inc @@ -14,8 +14,8 @@ // // Produce stack trace -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ +#define Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ #if defined(__linux__) && (defined(__i386__) || defined(__x86_64__)) #include <ucontext.h> // for ucontext_t @@ -157,8 +157,8 @@ static uintptr_t GetFP(const void *vuc) { // checks (the strictness of which is controlled by the boolean parameter // "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. template <bool STRICT_UNWINDING, bool WITH_CONTEXT> -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. static void **NextStackFrame(void **old_fp, const void *uc, size_t stack_low, size_t stack_high) { void **new_fp = (void **)*old_fp; @@ -174,7 +174,7 @@ static void **NextStackFrame(void **old_fp, const void *uc, static const unsigned char *kernel_rt_sigreturn_address = nullptr; static const unsigned char *kernel_vsyscall_address = nullptr; if (num_push_instructions == -1) { -#ifdef ABSL_HAVE_VDSO_SUPPORT +#ifdef Y_ABSL_HAVE_VDSO_SUPPORT y_absl::debugging_internal::VDSOSupport vdso; if (vdso.IsPresent()) { y_absl::debugging_internal::VDSOSupport::SymbolInfo @@ -203,9 +203,9 @@ static void **NextStackFrame(void **old_fp, const void *uc, } else { num_push_instructions = 0; } -#else // ABSL_HAVE_VDSO_SUPPORT +#else // Y_ABSL_HAVE_VDSO_SUPPORT num_push_instructions = 0; -#endif // ABSL_HAVE_VDSO_SUPPORT +#endif // Y_ABSL_HAVE_VDSO_SUPPORT } if (num_push_instructions != 0 && kernel_rt_sigreturn_address != nullptr && old_fp[1] == kernel_rt_sigreturn_address) { @@ -302,9 +302,9 @@ static void **NextStackFrame(void **old_fp, const void *uc, } template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT> -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -ABSL_ATTRIBUTE_NOINLINE +Y_ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. +Y_ABSL_ATTRIBUTE_NOINLINE static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count, const void *ucp, int *min_dropped_frames) { int n = 0; @@ -352,13 +352,13 @@ static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count, } namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { bool StackTraceWorksForTest() { return true; } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/symbolize.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/symbolize.h index e6e2b0724a4..c404b3cf91a 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/symbolize.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/symbolize.h @@ -15,8 +15,8 @@ // This file contains internal parts of the Abseil symbolizer. // Do not depend on the anything in this file, it may change at anytime. -#ifndef ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ -#define ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ #ifdef __cplusplus @@ -26,11 +26,11 @@ #include "y_absl/base/config.h" #include "y_absl/strings/string_view.h" -#ifdef ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE -#error ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE cannot be directly set +#ifdef Y_ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE +#error Y_ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE cannot be directly set #elif defined(__ELF__) && defined(__GLIBC__) && !defined(__native_client__) \ && !defined(__asmjs__) && !defined(__wasm__) -#define ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE 1 +#define Y_ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE 1 #include <elf.h> #include <link.h> // For ElfW() macro. @@ -38,7 +38,7 @@ #include <util/generic/string.h> namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // Iterates over all sections, invoking callback on each with the section name @@ -57,25 +57,25 @@ bool GetSectionHeaderByName(int fd, const char *name, size_t name_len, ElfW(Shdr) *out); } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE +#endif // Y_ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE -#ifdef ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE -#error ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE cannot be directly set +#ifdef Y_ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE +#error Y_ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE cannot be directly set #elif defined(__APPLE__) -#define ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE 1 +#define Y_ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE 1 #endif -#ifdef ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE -#error ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE cannot be directly set +#ifdef Y_ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE +#error Y_ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE cannot be directly set #elif defined(__EMSCRIPTEN__) -#define ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE 1 +#define Y_ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE 1 #endif namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { struct SymbolDecoratorArgs { @@ -135,7 +135,7 @@ bool GetFileMappingHint(const void** start, const void** end, uint64_t* offset, const char** filename); } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl #endif // __cplusplus @@ -150,4 +150,4 @@ extern "C" YAbslInternalGetFileMappingHint(const void** start, const void** end, uint64_t* offset, const char** filename); -#endif // ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/vdso_support.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/vdso_support.cc index 7905eba32fe..ff28d04d574 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/vdso_support.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/vdso_support.cc @@ -18,7 +18,7 @@ #include "y_absl/debugging/internal/vdso_support.h" -#ifdef ABSL_HAVE_VDSO_SUPPORT // defined in vdso_support.h +#ifdef Y_ABSL_HAVE_VDSO_SUPPORT // defined in vdso_support.h #if !defined(__has_include) #define __has_include(header) 0 @@ -35,10 +35,10 @@ #if defined(__GLIBC__) && \ (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16)) -#define ABSL_HAVE_GETAUXVAL +#define Y_ABSL_HAVE_GETAUXVAL #endif -#ifdef ABSL_HAVE_GETAUXVAL +#ifdef Y_ABSL_HAVE_GETAUXVAL #include <sys/auxv.h> #endif @@ -56,10 +56,10 @@ using Elf32_auxv_t = Elf32_Auxinfo; #endif namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { -ABSL_CONST_INIT +Y_ABSL_CONST_INIT std::atomic<const void *> VDSOSupport::vdso_base_( debugging_internal::ElfMemImage::kInvalidBase); @@ -83,7 +83,7 @@ VDSOSupport::VDSOSupport() // the operation should be idempotent. const void *VDSOSupport::Init() { const auto kInvalidBase = debugging_internal::ElfMemImage::kInvalidBase; -#ifdef ABSL_HAVE_GETAUXVAL +#ifdef Y_ABSL_HAVE_GETAUXVAL if (vdso_base_.load(std::memory_order_relaxed) == kInvalidBase) { errno = 0; const void *const sysinfo_ehdr = @@ -92,7 +92,7 @@ const void *VDSOSupport::Init() { vdso_base_.store(sysinfo_ehdr, std::memory_order_relaxed); } } -#endif // ABSL_HAVE_GETAUXVAL +#endif // Y_ABSL_HAVE_GETAUXVAL if (vdso_base_.load(std::memory_order_relaxed) == kInvalidBase) { int fd = open("/proc/self/auxv", O_RDONLY); if (fd == -1) { @@ -130,7 +130,7 @@ const void *VDSOSupport::Init() { } const void *VDSOSupport::SetBase(const void *base) { - ABSL_RAW_CHECK(base != debugging_internal::ElfMemImage::kInvalidBase, + Y_ABSL_RAW_CHECK(base != debugging_internal::ElfMemImage::kInvalidBase, "internal error"); const void *old_base = vdso_base_.load(std::memory_order_relaxed); vdso_base_.store(base, std::memory_order_relaxed); @@ -170,14 +170,14 @@ long VDSOSupport::InitAndGetCPU(unsigned *cpu, // NOLINT(runtime/int) void *x, void *y) { Init(); GetCpuFn fn = getcpu_fn_.load(std::memory_order_relaxed); - ABSL_RAW_CHECK(fn != &InitAndGetCPU, "Init() did not set getcpu_fn_"); + Y_ABSL_RAW_CHECK(fn != &InitAndGetCPU, "Init() did not set getcpu_fn_"); return (*fn)(cpu, x, y); } // This function must be very fast, and may be called from very // low level (e.g. tcmalloc). Hence I avoid things like // GoogleOnceInit() and ::operator new. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY +Y_ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY int GetCPU() { unsigned cpu; int ret_code = (*VDSOSupport::getcpu_fn_)(&cpu, nullptr, nullptr); @@ -185,7 +185,7 @@ int GetCPU() { } } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_HAVE_VDSO_SUPPORT +#endif // Y_ABSL_HAVE_VDSO_SUPPORT diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/vdso_support.h b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/vdso_support.h index c0064b9fe10..40a22780d57 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/vdso_support.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/debugging/internal/vdso_support.h @@ -36,24 +36,24 @@ // fn = reinterpret_cast<FN>(info.address); // } -#ifndef ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ -#define ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ +#ifndef Y_ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ +#define Y_ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ #include <atomic> #include "y_absl/base/attributes.h" #include "y_absl/debugging/internal/elf_mem_image.h" -#ifdef ABSL_HAVE_ELF_MEM_IMAGE +#ifdef Y_ABSL_HAVE_ELF_MEM_IMAGE -#ifdef ABSL_HAVE_VDSO_SUPPORT -#error ABSL_HAVE_VDSO_SUPPORT cannot be directly set +#ifdef Y_ABSL_HAVE_VDSO_SUPPORT +#error Y_ABSL_HAVE_VDSO_SUPPORT cannot be directly set #else -#define ABSL_HAVE_VDSO_SUPPORT 1 +#define Y_ABSL_HAVE_VDSO_SUPPORT 1 #endif namespace y_absl { -ABSL_NAMESPACE_BEGIN +Y_ABSL_NAMESPACE_BEGIN namespace debugging_internal { // NOTE: this class may be used from within tcmalloc, and can not @@ -134,7 +134,7 @@ class VDSOSupport { // This function pointer may point to InitAndGetCPU, // GetCPUViaSyscall, or __vdso_getcpu at different stages of initialization. - ABSL_CONST_INIT static std::atomic<GetCpuFn> getcpu_fn_; + Y_ABSL_CONST_INIT static std::atomic<GetCpuFn> getcpu_fn_; friend int GetCPU(void); // Needs access to getcpu_fn_. @@ -150,9 +150,9 @@ class VDSOSupport { int GetCPU(); } // namespace debugging_internal -ABSL_NAMESPACE_END +Y_ABSL_NAMESPACE_END } // namespace y_absl -#endif // ABSL_HAVE_ELF_MEM_IMAGE +#endif // Y_ABSL_HAVE_ELF_MEM_IMAGE -#endif // ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ +#endif // Y_ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ |