aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritrofimow <itrofimow@yandex-team.com>2024-02-08 12:44:31 +0300
committeritrofimow <itrofimow@yandex-team.com>2024-02-08 13:38:13 +0300
commit486736e2393fd6541e7259e760b75ba24250ab36 (patch)
tree22201df9225ae50cc03d1face151f88ffd400de3
parent01d287e8a728fca6de124876147f7522a9a7ab00 (diff)
downloadydb-486736e2393fd6541e7259e760b75ba24250ab36.tar.gz
Update contrib/libs/cxxsupp/libcxxrt to 2024-02-06
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/README3
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/cxxabi.h17
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/exception.cc42
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/memory.cc14
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/stdexcept.cc48
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/stdexcept.h50
-rw-r--r--contrib/libs/cxxsupp/libcxxrt/ya.make4
7 files changed, 93 insertions, 85 deletions
diff --git a/contrib/libs/cxxsupp/libcxxrt/README b/contrib/libs/cxxsupp/libcxxrt/README
index c784c11693..8cc7df9cc3 100644
--- a/contrib/libs/cxxsupp/libcxxrt/README
+++ b/contrib/libs/cxxsupp/libcxxrt/README
@@ -1,9 +1,10 @@
libcxxabi
=========
-This library implements the Code Sourcery C++ ABI, as documented here:
+This library implements the Itanium C++ ABI, as documented here:
http://www.codesourcery.com/public/cxx-abi/abi.html
+https://itanium-cxx-abi.github.io/cxx-abi/
It is intended to sit below an STL implementation, and provide features required by the compiler for implementation of the C++ language.
diff --git a/contrib/libs/cxxsupp/libcxxrt/cxxabi.h b/contrib/libs/cxxsupp/libcxxrt/cxxabi.h
index a7495843ed..6526f22b65 100644
--- a/contrib/libs/cxxsupp/libcxxrt/cxxabi.h
+++ b/contrib/libs/cxxsupp/libcxxrt/cxxabi.h
@@ -40,8 +40,15 @@ namespace std
*/
#ifdef __cplusplus
+#if __cplusplus < 201103L
+#define _LIBCXXRT_NOEXCEPT noexcept
+#else
+#define _LIBCXXRT_NOEXCEPT noexcept
+#endif
namespace __cxxabiv1 {
extern "C" {
+#else
+#define _LIBCXXRT_NOEXCEPT
#endif
/**
* Function type to call when an unexpected exception is encountered.
@@ -75,7 +82,7 @@ typedef void (*terminate_handler)();
*/
struct __cxa_exception
{
-#if __LP64__
+#ifdef __LP64__
/**
* Now _Unwind_Exception is marked with __attribute__((aligned)), which
* implies __cxa_exception is also aligned. Insert padding in the
@@ -153,7 +160,7 @@ struct __cxa_exception
* need to adjust the thrown pointer to make it all work correctly.
*/
void *adjustedPtr;
-#if !__LP64__
+#ifndef __LP64__
/**
* Reference count. Used to support the C++11 exception_ptr class. This
* is prepended to the structure in 64-bit mode and squeezed in to the
@@ -206,12 +213,12 @@ __cxa_eh_globals *__cxa_get_globals_fast(void);
std::type_info * __cxa_current_exception_type();
-void *__cxa_allocate_exception(size_t thrown_size) noexcept;
+void *__cxa_allocate_exception(size_t thrown_size) _LIBCXXRT_NOEXCEPT;
-void __cxa_free_exception(void* thrown_exception) noexcept;
+void __cxa_free_exception(void* thrown_exception) _LIBCXXRT_NOEXCEPT;
__cxa_exception *__cxa_init_primary_exception(
- void *object, std::type_info* tinfo, void (*dest)(void *)) noexcept;
+ void *object, std::type_info* tinfo, void (*dest)(void *)) _LIBCXXRT_NOEXCEPT;
/**
* Throws an exception returned by __cxa_current_primary_exception(). This
diff --git a/contrib/libs/cxxsupp/libcxxrt/exception.cc b/contrib/libs/cxxsupp/libcxxrt/exception.cc
index 4c088d73cd..1e006de88b 100644
--- a/contrib/libs/cxxsupp/libcxxrt/exception.cc
+++ b/contrib/libs/cxxsupp/libcxxrt/exception.cc
@@ -99,7 +99,7 @@ static inline _Unwind_Reason_Code continueUnwinding(struct _Unwind_Exception *ex
}
-extern "C" void __cxa_free_exception(void *thrown_exception) noexcept;
+extern "C" void __cxa_free_exception(void *thrown_exception) _LIBCXXRT_NOEXCEPT;
extern "C" void __cxa_free_dependent_exception(void *thrown_exception);
extern "C" void* __dynamic_cast(const void *sub,
const __class_type_info *src,
@@ -176,7 +176,7 @@ struct __cxa_thread_info
*/
struct __cxa_dependent_exception
{
-#if __LP64__
+#ifdef __LP64__
void *reserve;
void *primaryException;
#endif
@@ -195,7 +195,7 @@ struct __cxa_dependent_exception
const char *languageSpecificData;
void *catchTemp;
void *adjustedPtr;
-#if !__LP64__
+#ifndef __LP64__
void *primaryException;
#endif
_Unwind_Exception unwindHeader;
@@ -219,8 +219,8 @@ namespace std
class exception
{
public:
- virtual ~exception();
- virtual const char* what() const noexcept;
+ virtual ~exception() _LIBCXXRT_NOEXCEPT;
+ virtual const char* what() const _LIBCXXRT_NOEXCEPT;
};
}
@@ -282,7 +282,7 @@ namespace std
{
// Forward declaration of standard library terminate() function used to
// abort execution.
- void terminate(void) noexcept;
+ void terminate(void) _LIBCXXRT_NOEXCEPT;
}
using namespace ABI_NAMESPACE;
@@ -711,7 +711,7 @@ static constexpr size_t backtrace_buffer_size = 0;
* emergency buffer if malloc() fails, and may block if there are no such
* buffers available.
*/
-extern "C" void *__cxa_allocate_exception(size_t thrown_size) noexcept
+extern "C" void *__cxa_allocate_exception(size_t thrown_size) _LIBCXXRT_NOEXCEPT
{
size_t size = thrown_size + exception_size + backtrace_buffer_size;
char *buffer = alloc_or_die(size);
@@ -736,7 +736,7 @@ extern "C" void *__cxa_allocate_dependent_exception(void)
* In this implementation, it is also called by __cxa_end_catch() and during
* thread cleanup.
*/
-extern "C" void __cxa_free_exception(void *thrown_exception) noexcept
+extern "C" void __cxa_free_exception(void *thrown_exception) _LIBCXXRT_NOEXCEPT
{
__cxa_exception *ex = reinterpret_cast<__cxa_exception*>(thrown_exception) - 1;
// Free the object that was thrown, calling its destructor
@@ -791,7 +791,7 @@ void __cxa_free_dependent_exception(void *thrown_exception)
* a handler, prints a back trace before aborting.
*/
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
-extern "C" void *__cxa_begin_catch(void *e) noexcept;
+extern "C" void *__cxa_begin_catch(void *e) _LIBCXXRT_NOEXCEPT;
#else
extern "C" void *__cxa_begin_catch(void *e);
#endif
@@ -871,7 +871,7 @@ static void throw_exception(__cxa_exception *ex)
}
extern "C" __cxa_exception *__cxa_init_primary_exception(
- void *object, std::type_info* tinfo, void (*dest)(void *)) noexcept {
+ void *object, std::type_info* tinfo, void (*dest)(void *)) _LIBCXXRT_NOEXCEPT {
__cxa_exception *ex = reinterpret_cast<__cxa_exception*>(object) - 1;
ex->referenceCount = 0;
@@ -1363,7 +1363,7 @@ BEGIN_PERSONALITY_FUNCTION(__gxx_personality_v0)
* C++ exceptions) of the unadjusted pointer (for foreign exceptions).
*/
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
-extern "C" void *__cxa_begin_catch(void *e) noexcept
+extern "C" void *__cxa_begin_catch(void *e) _LIBCXXRT_NOEXCEPT
#else
extern "C" void *__cxa_begin_catch(void *e)
#endif
@@ -1572,14 +1572,14 @@ namespace pathscale
/**
* Sets whether unexpected and terminate handlers should be thread-local.
*/
- void set_use_thread_local_handlers(bool flag) noexcept
+ void set_use_thread_local_handlers(bool flag) _LIBCXXRT_NOEXCEPT
{
thread_local_handlers = flag;
}
/**
* Sets a thread-local unexpected handler.
*/
- unexpected_handler set_unexpected(unexpected_handler f) noexcept
+ unexpected_handler set_unexpected(unexpected_handler f) _LIBCXXRT_NOEXCEPT
{
static __cxa_thread_info *info = thread_info();
unexpected_handler old = info->unexpectedHandler;
@@ -1589,7 +1589,7 @@ namespace pathscale
/**
* Sets a thread-local terminate handler.
*/
- terminate_handler set_terminate(terminate_handler f) noexcept
+ terminate_handler set_terminate(terminate_handler f) _LIBCXXRT_NOEXCEPT
{
static __cxa_thread_info *info = thread_info();
terminate_handler old = info->terminateHandler;
@@ -1604,7 +1604,7 @@ namespace std
* Sets the function that will be called when an exception specification is
* violated.
*/
- unexpected_handler set_unexpected(unexpected_handler f) noexcept
+ unexpected_handler set_unexpected(unexpected_handler f) _LIBCXXRT_NOEXCEPT
{
if (thread_local_handlers) { return pathscale::set_unexpected(f); }
@@ -1613,7 +1613,7 @@ namespace std
/**
* Sets the function that is called to terminate the program.
*/
- terminate_handler set_terminate(terminate_handler f) noexcept
+ terminate_handler set_terminate(terminate_handler f) _LIBCXXRT_NOEXCEPT
{
if (thread_local_handlers) { return pathscale::set_terminate(f); }
@@ -1623,7 +1623,7 @@ namespace std
* Terminates the program, calling a custom terminate implementation if
* required.
*/
- void terminate() noexcept
+ void terminate() _LIBCXXRT_NOEXCEPT
{
static __cxa_thread_info *info = thread_info();
if (0 != info && 0 != info->terminateHandler)
@@ -1656,7 +1656,7 @@ namespace std
* Returns whether there are any exceptions currently being thrown that
* have not been caught. This can occur inside a nested catch statement.
*/
- bool uncaught_exception() noexcept
+ bool uncaught_exception() _LIBCXXRT_NOEXCEPT
{
__cxa_thread_info *info = thread_info();
return info->globals.uncaughtExceptions != 0;
@@ -1665,7 +1665,7 @@ namespace std
* Returns the number of exceptions currently being thrown that have not
* been caught. This can occur inside a nested catch statement.
*/
- int uncaught_exceptions() noexcept
+ int uncaught_exceptions() _LIBCXXRT_NOEXCEPT
{
__cxa_thread_info *info = thread_info();
return info->globals.uncaughtExceptions;
@@ -1673,7 +1673,7 @@ namespace std
/**
* Returns the current unexpected handler.
*/
- unexpected_handler get_unexpected() noexcept
+ unexpected_handler get_unexpected() _LIBCXXRT_NOEXCEPT
{
__cxa_thread_info *info = thread_info();
if (info->unexpectedHandler)
@@ -1685,7 +1685,7 @@ namespace std
/**
* Returns the current terminate handler.
*/
- terminate_handler get_terminate() noexcept
+ terminate_handler get_terminate() _LIBCXXRT_NOEXCEPT
{
__cxa_thread_info *info = thread_info();
if (info->terminateHandler)
diff --git a/contrib/libs/cxxsupp/libcxxrt/memory.cc b/contrib/libs/cxxsupp/libcxxrt/memory.cc
index caa0aba79a..ef9eb415d7 100644
--- a/contrib/libs/cxxsupp/libcxxrt/memory.cc
+++ b/contrib/libs/cxxsupp/libcxxrt/memory.cc
@@ -73,10 +73,8 @@ namespace std
#if __cplusplus < 201103L
-#define NOEXCEPT noexcept
#define BADALLOC throw(std::bad_alloc)
#else
-#define NOEXCEPT noexcept
#define BADALLOC
#endif
@@ -138,14 +136,14 @@ void* operator new(size_t size) BADALLOC
__attribute__((weak))
-void* operator new(size_t size, const std::nothrow_t &) NOEXCEPT
+void* operator new(size_t size, const std::nothrow_t &) _LIBCXXRT_NOEXCEPT
{
return noexcept_new<(::operator new)>(size);
}
__attribute__((weak))
-void operator delete(void * ptr) NOEXCEPT
+void operator delete(void * ptr) _LIBCXXRT_NOEXCEPT
{
free(ptr);
}
@@ -159,14 +157,14 @@ void * operator new[](size_t size) BADALLOC
__attribute__((weak))
-void * operator new[](size_t size, const std::nothrow_t &) NOEXCEPT
+void * operator new[](size_t size, const std::nothrow_t &) _LIBCXXRT_NOEXCEPT
{
return noexcept_new<(::operator new[])>(size);
}
__attribute__((weak))
-void operator delete[](void * ptr) NOEXCEPT
+void operator delete[](void * ptr) _LIBCXXRT_NOEXCEPT
{
::operator delete(ptr);
}
@@ -176,14 +174,14 @@ void operator delete[](void * ptr) NOEXCEPT
#if __cplusplus >= 201402L
__attribute__((weak))
-void operator delete(void * ptr, size_t) NOEXCEPT
+void operator delete(void * ptr, size_t) _LIBCXXRT_NOEXCEPT
{
::operator delete(ptr);
}
__attribute__((weak))
-void operator delete[](void * ptr, size_t) NOEXCEPT
+void operator delete[](void * ptr, size_t) _LIBCXXRT_NOEXCEPT
{
::operator delete(ptr);
}
diff --git a/contrib/libs/cxxsupp/libcxxrt/stdexcept.cc b/contrib/libs/cxxsupp/libcxxrt/stdexcept.cc
index 07c62a731b..f0c2cddbec 100644
--- a/contrib/libs/cxxsupp/libcxxrt/stdexcept.cc
+++ b/contrib/libs/cxxsupp/libcxxrt/stdexcept.cc
@@ -31,66 +31,66 @@
namespace std {
-exception::exception() noexcept {}
-exception::~exception() {}
-exception::exception(const exception&) noexcept {}
-exception& exception::operator=(const exception&) noexcept
+exception::exception() _LIBCXXRT_NOEXCEPT {}
+exception::~exception() _LIBCXXRT_NOEXCEPT {}
+exception::exception(const exception&) _LIBCXXRT_NOEXCEPT {}
+exception& exception::operator=(const exception&) _LIBCXXRT_NOEXCEPT
{
return *this;
}
-const char* exception::what() const noexcept
+const char* exception::what() const _LIBCXXRT_NOEXCEPT
{
return "std::exception";
}
-bad_alloc::bad_alloc() noexcept {}
-bad_alloc::~bad_alloc() {}
-bad_alloc::bad_alloc(const bad_alloc&) noexcept {}
-bad_alloc& bad_alloc::operator=(const bad_alloc&) noexcept
+bad_alloc::bad_alloc() _LIBCXXRT_NOEXCEPT {}
+bad_alloc::~bad_alloc() _LIBCXXRT_NOEXCEPT {}
+bad_alloc::bad_alloc(const bad_alloc&) _LIBCXXRT_NOEXCEPT {}
+bad_alloc& bad_alloc::operator=(const bad_alloc&) _LIBCXXRT_NOEXCEPT
{
return *this;
}
-const char* bad_alloc::what() const noexcept
+const char* bad_alloc::what() const _LIBCXXRT_NOEXCEPT
{
return "cxxrt::bad_alloc";
}
-bad_cast::bad_cast() noexcept {}
-bad_cast::~bad_cast() {}
-bad_cast::bad_cast(const bad_cast&) noexcept {}
-bad_cast& bad_cast::operator=(const bad_cast&) noexcept
+bad_cast::bad_cast() _LIBCXXRT_NOEXCEPT {}
+bad_cast::~bad_cast() _LIBCXXRT_NOEXCEPT {}
+bad_cast::bad_cast(const bad_cast&) _LIBCXXRT_NOEXCEPT {}
+bad_cast& bad_cast::operator=(const bad_cast&) _LIBCXXRT_NOEXCEPT
{
return *this;
}
-const char* bad_cast::what() const noexcept
+const char* bad_cast::what() const _LIBCXXRT_NOEXCEPT
{
return "std::bad_cast";
}
-bad_typeid::bad_typeid() noexcept {}
-bad_typeid::~bad_typeid() {}
-bad_typeid::bad_typeid(const bad_typeid &__rhs) noexcept {}
-bad_typeid& bad_typeid::operator=(const bad_typeid &__rhs) noexcept
+bad_typeid::bad_typeid() _LIBCXXRT_NOEXCEPT {}
+bad_typeid::~bad_typeid() _LIBCXXRT_NOEXCEPT {}
+bad_typeid::bad_typeid(const bad_typeid &__rhs) _LIBCXXRT_NOEXCEPT {}
+bad_typeid& bad_typeid::operator=(const bad_typeid &__rhs) _LIBCXXRT_NOEXCEPT
{
return *this;
}
-const char* bad_typeid::what() const noexcept
+const char* bad_typeid::what() const _LIBCXXRT_NOEXCEPT
{
return "std::bad_typeid";
}
-bad_array_new_length::bad_array_new_length() noexcept {}
+bad_array_new_length::bad_array_new_length() _LIBCXXRT_NOEXCEPT {}
bad_array_new_length::~bad_array_new_length() {}
-bad_array_new_length::bad_array_new_length(const bad_array_new_length&) noexcept {}
-bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) noexcept
+bad_array_new_length::bad_array_new_length(const bad_array_new_length&) _LIBCXXRT_NOEXCEPT {}
+bad_array_new_length& bad_array_new_length::operator=(const bad_array_new_length&) _LIBCXXRT_NOEXCEPT
{
return *this;
}
-const char* bad_array_new_length::what() const noexcept
+const char* bad_array_new_length::what() const _LIBCXXRT_NOEXCEPT
{
return "std::bad_array_new_length";
}
diff --git a/contrib/libs/cxxsupp/libcxxrt/stdexcept.h b/contrib/libs/cxxsupp/libcxxrt/stdexcept.h
index 13763f4824..d9ba05224c 100644
--- a/contrib/libs/cxxsupp/libcxxrt/stdexcept.h
+++ b/contrib/libs/cxxsupp/libcxxrt/stdexcept.h
@@ -29,17 +29,19 @@
* of the exceptions for the runtime to use.
*/
+#include "cxxabi.h"
+
namespace std
{
class exception
{
public:
- exception() noexcept;
- exception(const exception&) noexcept;
- exception& operator=(const exception&) noexcept;
- virtual ~exception();
- virtual const char* what() const noexcept;
+ exception() _LIBCXXRT_NOEXCEPT;
+ exception(const exception&) _LIBCXXRT_NOEXCEPT;
+ exception& operator=(const exception&) _LIBCXXRT_NOEXCEPT;
+ virtual ~exception() _LIBCXXRT_NOEXCEPT;
+ virtual const char* what() const _LIBCXXRT_NOEXCEPT;
};
@@ -49,11 +51,11 @@ namespace std
class bad_alloc: public exception
{
public:
- bad_alloc() noexcept;
- bad_alloc(const bad_alloc&) noexcept;
- bad_alloc& operator=(const bad_alloc&) noexcept;
- ~bad_alloc();
- virtual const char* what() const noexcept;
+ bad_alloc() _LIBCXXRT_NOEXCEPT;
+ bad_alloc(const bad_alloc&) _LIBCXXRT_NOEXCEPT;
+ bad_alloc& operator=(const bad_alloc&) _LIBCXXRT_NOEXCEPT;
+ ~bad_alloc() _LIBCXXRT_NOEXCEPT;
+ virtual const char* what() const _LIBCXXRT_NOEXCEPT;
};
/**
@@ -61,11 +63,11 @@ namespace std
*/
class bad_cast: public exception {
public:
- bad_cast() noexcept;
- bad_cast(const bad_cast&) noexcept;
- bad_cast& operator=(const bad_cast&) noexcept;
- virtual ~bad_cast();
- virtual const char* what() const noexcept;
+ bad_cast() _LIBCXXRT_NOEXCEPT;
+ bad_cast(const bad_cast&) _LIBCXXRT_NOEXCEPT;
+ bad_cast& operator=(const bad_cast&) _LIBCXXRT_NOEXCEPT;
+ virtual ~bad_cast() _LIBCXXRT_NOEXCEPT;
+ virtual const char* what() const _LIBCXXRT_NOEXCEPT;
};
/**
@@ -74,21 +76,21 @@ namespace std
class bad_typeid: public exception
{
public:
- bad_typeid() noexcept;
- bad_typeid(const bad_typeid &__rhs) noexcept;
- virtual ~bad_typeid();
- bad_typeid& operator=(const bad_typeid &__rhs) noexcept;
- virtual const char* what() const noexcept;
+ bad_typeid() _LIBCXXRT_NOEXCEPT;
+ bad_typeid(const bad_typeid &__rhs) _LIBCXXRT_NOEXCEPT;
+ virtual ~bad_typeid() _LIBCXXRT_NOEXCEPT;
+ bad_typeid& operator=(const bad_typeid &__rhs) _LIBCXXRT_NOEXCEPT;
+ virtual const char* what() const _LIBCXXRT_NOEXCEPT;
};
class bad_array_new_length: public bad_alloc
{
public:
- bad_array_new_length() noexcept;
- bad_array_new_length(const bad_array_new_length&) noexcept;
- bad_array_new_length& operator=(const bad_array_new_length&) noexcept;
+ bad_array_new_length() _LIBCXXRT_NOEXCEPT;
+ bad_array_new_length(const bad_array_new_length&) _LIBCXXRT_NOEXCEPT;
+ bad_array_new_length& operator=(const bad_array_new_length&) _LIBCXXRT_NOEXCEPT;
virtual ~bad_array_new_length();
- virtual const char *what() const noexcept;
+ virtual const char *what() const _LIBCXXRT_NOEXCEPT;
};
diff --git a/contrib/libs/cxxsupp/libcxxrt/ya.make b/contrib/libs/cxxsupp/libcxxrt/ya.make
index 2f183bd47b..61ba8cd058 100644
--- a/contrib/libs/cxxsupp/libcxxrt/ya.make
+++ b/contrib/libs/cxxsupp/libcxxrt/ya.make
@@ -11,9 +11,9 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(2024-02-04)
+VERSION(2024-02-06)
-ORIGINAL_SOURCE(https://github.com/libcxxrt/libcxxrt/archive/39f76d286ffa70e15ae45632fe3fa5ea96cd46e4.tar.gz)
+ORIGINAL_SOURCE(https://github.com/libcxxrt/libcxxrt/archive/bd4fa85d7f772f2ad32146d5681c91612fc93842.tar.gz)
ADDINCL(
contrib/libs/cxxsupp/libcxxrt