Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:llunak:my
llvm14
l-libc-fix-std-to_string-crashing-in-debug-mode...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File l-libc-fix-std-to_string-crashing-in-debug-mode.patch of Package llvm14
--- ./src/string.cpp.sav 2022-04-29 02:10:18.000000000 +0200 +++ ./src/string.cpp 2022-05-15 10:37:52.163695403 +0200 @@ -511,4 +511,35 @@ wstring to_wstring(double val) { re wstring to_wstring(long double val) { return as_string(get_swprintf(), initial_string<wstring>()(), L"%Lf", val); } #endif +#ifdef _LIBCPP_BUILDING_DEBUG_MODE_SUPPORT +inline namespace __debug +{ +_LIBCPP_FUNC_VIS string __to_string (int val) { return i_to_string< string>(val); } +_LIBCPP_FUNC_VIS string __to_string (long val) { return i_to_string< string>(val); } +_LIBCPP_FUNC_VIS string __to_string (long long val) { return i_to_string< string>(val); } +_LIBCPP_FUNC_VIS string __to_string (unsigned val) { return i_to_string< string>(val); } +_LIBCPP_FUNC_VIS string __to_string (unsigned long val) { return i_to_string< string>(val); } +_LIBCPP_FUNC_VIS string __to_string (unsigned long long val) { return i_to_string< string>(val); } + +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS +_LIBCPP_FUNC_VIS wstring __to_wstring(int val) { return i_to_string<wstring>(val); } +_LIBCPP_FUNC_VIS wstring __to_wstring(long val) { return i_to_string<wstring>(val); } +_LIBCPP_FUNC_VIS wstring __to_wstring(long long val) { return i_to_string<wstring>(val); } +_LIBCPP_FUNC_VIS wstring __to_wstring(unsigned val) { return i_to_string<wstring>(val); } +_LIBCPP_FUNC_VIS wstring __to_wstring(unsigned long val) { return i_to_string<wstring>(val); } +_LIBCPP_FUNC_VIS wstring __to_wstring(unsigned long long val) { return i_to_string<wstring>(val); } +#endif + +_LIBCPP_FUNC_VIS string __to_string (float val) { return as_string(snprintf, initial_string< string>()(), "%f", val); } +_LIBCPP_FUNC_VIS string __to_string (double val) { return as_string(snprintf, initial_string< string>()(), "%f", val); } +_LIBCPP_FUNC_VIS string __to_string (long double val) { return as_string(snprintf, initial_string< string>()(), "%Lf", val); } + +#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS +_LIBCPP_FUNC_VIS wstring __to_wstring(float val) { return as_string(get_swprintf(), initial_string<wstring>()(), L"%f", val); } +_LIBCPP_FUNC_VIS wstring __to_wstring(double val) { return as_string(get_swprintf(), initial_string<wstring>()(), L"%f", val); } +_LIBCPP_FUNC_VIS wstring __to_wstring(long double val) { return as_string(get_swprintf(), initial_string<wstring>()(), L"%Lf", val); } +#endif +} +#endif + _LIBCPP_END_NAMESPACE_STD --- ./lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist.sav 2022-04-29 02:10:18.000000000 +0200 +++ ./lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist 2022-05-15 10:38:39.076223836 +0200 @@ -1348,6 +1348,24 @@ {'is_defined': True, 'name': '_ZNSt3__15ctypeIwED0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__15ctypeIwED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__15ctypeIwED2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug11__to_stringEy', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEd', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEe', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEf', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEj', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEm', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEx', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__17__debug12__to_wstringEy', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__15mutex4lockEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__15mutex6unlockEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__15mutex8try_lockEv', 'type': 'FUNC'} --- ./CMakeLists.txt.sav 2022-04-29 02:10:18.000000000 +0200 +++ ./CMakeLists.txt 2022-05-15 10:37:45.403619256 +0200 @@ -581,6 +581,10 @@ function(cxx_add_basic_build_flags targe # library. target_compile_definitions(${target} PRIVATE -D_LIBCPP_BUILDING_LIBRARY) + if (LIBCXX_ENABLE_DEBUG_MODE_SUPPORT) + target_compile_definitions(${target} PRIVATE -D_LIBCPP_BUILDING_DEBUG_MODE_SUPPORT) + endif() + if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS) target_compile_definitions(${target} PRIVATE -D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS) endif() --- ./include/string.sav 2022-04-29 02:10:18.000000000 +0200 +++ ./include/string 2022-05-15 10:37:45.403619256 +0200 @@ -4323,6 +4323,7 @@ _LIBCPP_FUNC_VIS float stof (const _LIBCPP_FUNC_VIS double stod (const string& __str, size_t* __idx = nullptr); _LIBCPP_FUNC_VIS long double stold(const string& __str, size_t* __idx = nullptr); +#if _LIBCPP_DEBUG_LEVEL != 2 _LIBCPP_FUNC_VIS string to_string(int __val); _LIBCPP_FUNC_VIS string to_string(unsigned __val); _LIBCPP_FUNC_VIS string to_string(long __val); @@ -4332,6 +4333,84 @@ _LIBCPP_FUNC_VIS string to_string(unsign _LIBCPP_FUNC_VIS string to_string(float __val); _LIBCPP_FUNC_VIS string to_string(double __val); _LIBCPP_FUNC_VIS string to_string(long double __val); +#else +inline namespace __debug +{ +_LIBCPP_FUNC_VIS string __to_string(int __val); +_LIBCPP_FUNC_VIS string __to_string(unsigned __val); +_LIBCPP_FUNC_VIS string __to_string(long __val); +_LIBCPP_FUNC_VIS string __to_string(unsigned long __val); +_LIBCPP_FUNC_VIS string __to_string(long long __val); +_LIBCPP_FUNC_VIS string __to_string(unsigned long long __val); +_LIBCPP_FUNC_VIS string __to_string(float __val); +_LIBCPP_FUNC_VIS string __to_string(double __val); +_LIBCPP_FUNC_VIS string __to_string(long double __val); + +inline _LIBCPP_HIDE_FROM_ABI string to_string(int __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI string to_string(unsigned __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI string to_string(long __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI string to_string(unsigned long __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI string to_string(long long __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI string to_string(unsigned long long __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI string to_string(float __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI string to_string(double __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI string to_string(long double __val) +{ + string __s = __to_string(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +} +#endif #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS _LIBCPP_FUNC_VIS int stoi (const wstring& __str, size_t* __idx = nullptr, int __base = 10); @@ -4344,6 +4423,7 @@ _LIBCPP_FUNC_VIS float stof (const _LIBCPP_FUNC_VIS double stod (const wstring& __str, size_t* __idx = nullptr); _LIBCPP_FUNC_VIS long double stold(const wstring& __str, size_t* __idx = nullptr); +#if _LIBCPP_DEBUG_LEVEL != 2 _LIBCPP_FUNC_VIS wstring to_wstring(int __val); _LIBCPP_FUNC_VIS wstring to_wstring(unsigned __val); _LIBCPP_FUNC_VIS wstring to_wstring(long __val); @@ -4353,6 +4433,84 @@ _LIBCPP_FUNC_VIS wstring to_wstring(unsi _LIBCPP_FUNC_VIS wstring to_wstring(float __val); _LIBCPP_FUNC_VIS wstring to_wstring(double __val); _LIBCPP_FUNC_VIS wstring to_wstring(long double __val); +#else +inline namespace __debug +{ +_LIBCPP_FUNC_VIS wstring __to_wstring(int __val); +_LIBCPP_FUNC_VIS wstring __to_wstring(unsigned __val); +_LIBCPP_FUNC_VIS wstring __to_wstring(long __val); +_LIBCPP_FUNC_VIS wstring __to_wstring(unsigned long __val); +_LIBCPP_FUNC_VIS wstring __to_wstring(long long __val); +_LIBCPP_FUNC_VIS wstring __to_wstring(unsigned long long __val); +_LIBCPP_FUNC_VIS wstring __to_wstring(float __val); +_LIBCPP_FUNC_VIS wstring __to_wstring(double __val); +_LIBCPP_FUNC_VIS wstring __to_wstring(long double __val); + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(int __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(unsigned __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(long __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(unsigned long __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(long long __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(unsigned long long __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(float __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(double __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +inline _LIBCPP_HIDE_FROM_ABI wstring to_wstring(long double __val) +{ + wstring __s = __to_wstring(__val); + std::__debug_db_insert_c(&__s); + return __s; +} + +} +#endif #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS template<class _CharT, class _Traits, class _Allocator>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor