Skip to content

Commit 9867246

Browse files
Test for 'noexcept' (and related fixes)
1 parent 5b0518c commit 9867246

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+691
-455
lines changed

libcxx/include/__stacktrace/base.h

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,9 @@ class _LIBCPP_EXPORTED_FROM_ABI stacktrace_entry;
4242

4343
namespace __stacktrace {
4444

45-
struct _LIBCPP_HIDE_FROM_ABI alloc final {
46-
function<byte*(size_t)> __alloc_bytes_;
47-
function<void(byte*, size_t)> __dealloc_bytes_;
48-
49-
template <class _Allocator>
50-
_LIBCPP_HIDE_FROM_ABI alloc(_Allocator __alloc) {
51-
using _AT = allocator_traits<_Allocator>;
52-
using _BA = typename _AT::template rebind_alloc<byte>;
53-
auto __ba = _BA(__alloc);
54-
__alloc_bytes_ = [__ba](size_t __sz) mutable { return __ba.allocate(__sz); };
55-
__dealloc_bytes_ = [__ba](void* __ptr, size_t __sz) mutable { __ba.deallocate((byte*)__ptr, __sz); };
56-
}
45+
struct _LIBCPP_HIDE_FROM_ABI entry_base;
5746

47+
struct _LIBCPP_EXPORTED_FROM_ABI base {
5848
template <typename _Tp>
5949
struct _LIBCPP_HIDE_FROM_ABI Alloc {
6050
function<byte*(size_t)> __alloc_bytes_;
@@ -66,6 +56,7 @@ struct _LIBCPP_HIDE_FROM_ABI alloc final {
6656
template <typename _T2 = _Tp>
6757
Alloc(Alloc<_T2> const& __rhs) : Alloc(__rhs.__alloc_bytes_, __rhs.__dealloc_bytes_) {}
6858

59+
// XXX Alignment?
6960
using value_type = _Tp;
7061
[[nodiscard]] _Tp* allocate(size_t __sz) { return (_Tp*)__alloc_bytes_(__sz * sizeof(_Tp)); }
7162
void deallocate(_Tp* __ptr, size_t __sz) { __dealloc_bytes_((byte*)__ptr, __sz * sizeof(_Tp)); }
@@ -103,30 +94,53 @@ struct _LIBCPP_HIDE_FROM_ABI alloc final {
10394
_LIBCPP_HIDE_FROM_ABI list<_Tp> make_list(_Args... __args) {
10495
return list(std::forward<_Args>(__args)..., make_alloc<_Tp>());
10596
}
97+
98+
_LIBCPP_NO_TAIL_CALLS _LIBCPP_NOINLINE _LIBCPP_EXPORTED_FROM_ABI void
99+
build_stacktrace(size_t __skip, size_t __max_depth);
100+
101+
base();
102+
103+
template <class _Allocator>
104+
explicit _LIBCPP_EXPORTED_FROM_ABI base(_Allocator __alloc);
105+
106+
function<byte*(size_t)> __alloc_bytes_;
107+
function<void(byte*, size_t)> __dealloc_bytes_;
108+
vec<entry_base> __entries_;
109+
str __main_prog_path_;
106110
};
107111

108112
struct _LIBCPP_HIDE_FROM_ABI entry_base {
109-
uintptr_t __addr_actual_{}; // this address, as observed in this current process
110-
uintptr_t __addr_unslid_{}; // address adjusted for ASLR
111-
optional<__stacktrace::alloc::str> __desc_{}; // uses wrapped _Allocator from caller
112-
optional<__stacktrace::alloc::str> __file_{}; // uses wrapped _Allocator from caller
113+
uintptr_t __addr_actual_{}; // this address, as observed in this current process
114+
uintptr_t __addr_unslid_{}; // address adjusted for ASLR
115+
optional<__stacktrace::base::str> __desc_{}; // uses wrapped _Allocator from caller
116+
optional<__stacktrace::base::str> __file_{}; // uses wrapped _Allocator from caller
113117
uint_least32_t __line_{};
114118

115119
_LIBCPP_HIDE_FROM_ABI stacktrace_entry to_stacktrace_entry() const;
116120
};
117121

118-
struct _LIBCPP_EXPORTED_FROM_ABI builder final {
119-
alloc __alloc_; // wraps the caller-provided allocator
120-
alloc::vec<entry_base> __entries_;
121-
alloc::str __main_prog_path_;
122-
123-
template <class _Allocator>
124-
explicit _LIBCPP_EXPORTED_FROM_ABI builder(_Allocator __alloc)
125-
: __alloc_(__alloc), __entries_(__alloc_.make_vec<entry_base>()), __main_prog_path_(__alloc_.make_str()) {}
126-
127-
_LIBCPP_NO_TAIL_CALLS _LIBCPP_NOINLINE _LIBCPP_EXPORTED_FROM_ABI void
128-
build_stacktrace(size_t __skip, size_t __max_depth);
129-
};
122+
template <class _Allocator>
123+
auto __alloc_wrap(_Allocator const& __alloc) {
124+
using _AT = allocator_traits<_Allocator>;
125+
using _BA = typename _AT::template rebind_alloc<byte>;
126+
auto __ba = _BA(__alloc);
127+
return [__ba = std::move(__ba)](size_t __sz) mutable { return __ba.allocate(__sz); };
128+
}
129+
130+
template <class _Allocator>
131+
auto __dealloc_wrap(_Allocator const& __alloc) {
132+
using _AT = allocator_traits<_Allocator>;
133+
using _BA = typename _AT::template rebind_alloc<byte>;
134+
auto __ba = _BA(__alloc);
135+
return [__ba = std::move(__ba)](void* __ptr, size_t __sz) mutable { __ba.deallocate((byte*)__ptr, __sz); };
136+
}
137+
138+
template <class _Allocator>
139+
_LIBCPP_EXPORTED_FROM_ABI base::base(_Allocator __alloc)
140+
: __alloc_bytes_(__alloc_wrap(__alloc)),
141+
__dealloc_bytes_(__dealloc_wrap(__alloc)),
142+
__entries_(make_vec<entry_base>()),
143+
__main_prog_path_(make_str()) {}
130144

131145
} // namespace __stacktrace
132146

libcxx/include/__stacktrace/basic.h

Lines changed: 28 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD
4343
class stacktrace_entry;
4444

4545
template <class _Allocator>
46-
class _LIBCPP_EXPORTED_FROM_ABI basic_stacktrace {
46+
class _LIBCPP_EXPORTED_FROM_ABI basic_stacktrace : private __stacktrace::base {
4747
friend struct hash<basic_stacktrace<_Allocator>>;
4848
friend struct __stacktrace::__to_string;
4949

5050
using _ATraits _LIBCPP_NODEBUG = allocator_traits<_Allocator>;
51-
constexpr static bool __kPropOnCopy = _ATraits::propagate_on_container_copy_assignment::value;
52-
constexpr static bool __kPropOnMove = _ATraits::propagate_on_container_move_assignment::value;
51+
constexpr static bool __kPropOnCopyAssign = _ATraits::propagate_on_container_copy_assignment::value;
52+
constexpr static bool __kPropOnMoveAssign = _ATraits::propagate_on_container_move_assignment::value;
5353
constexpr static bool __kPropOnSwap = _ATraits::propagate_on_container_swap::value;
5454
constexpr static bool __kAlwaysEqual = _ATraits::is_always_equal::value;
5555
constexpr static bool __kNoThrowDflConstruct = is_nothrow_default_constructible_v<_Allocator>;
5656
constexpr static bool __kNoThrowAlloc =
5757
noexcept(noexcept(_Allocator().allocate(1)) && noexcept(_Allocator().allocate_at_least(1)));
5858

59-
[[no_unique_address]] _Allocator __alloc_;
59+
[[no_unique_address]]
60+
_Allocator __alloc_;
6061

6162
using __entry_vec _LIBCPP_NODEBUG = vector<stacktrace_entry, _Allocator>;
6263
__entry_vec __entries_;
@@ -94,7 +95,7 @@ class _LIBCPP_EXPORTED_FROM_ABI basic_stacktrace {
9495
current(size_type __skip,
9596
size_type __max_depth,
9697
const allocator_type& __caller_alloc = allocator_type()) noexcept(__kNoThrowAlloc) {
97-
__stacktrace::builder __builder(__caller_alloc);
98+
__stacktrace::base __builder(__caller_alloc);
9899
__builder.build_stacktrace(__skip + 1, __max_depth);
99100
basic_stacktrace<_Allocator> __ret{__caller_alloc};
100101
__ret.__entries_.reserve(__builder.__entries_.size());
@@ -109,57 +110,40 @@ class _LIBCPP_EXPORTED_FROM_ABI basic_stacktrace {
109110
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace() noexcept(__kNoThrowDflConstruct) : basic_stacktrace(allocator_type()) {}
110111

111112
_LIBCPP_EXPORTED_FROM_ABI explicit basic_stacktrace(const allocator_type& __alloc) noexcept
112-
: __alloc_(__alloc), __entries_(__alloc_) {}
113+
: base(__alloc), __entries_(__alloc_) {}
113114

114-
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace(basic_stacktrace const& __other) = default;
115+
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace(basic_stacktrace const& __other)
116+
: __alloc_(_ATraits::select_on_container_copy_construction(__other.__alloc_)),
117+
__entries_(__other.__entries_, __alloc_) {}
115118

116-
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace(basic_stacktrace&& __other) noexcept = default;
119+
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace(basic_stacktrace&& __other) noexcept
120+
: __alloc_(std::move(__other.__alloc_)), __entries_(std::move(__other.__entries_)) {}
117121

118122
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace(basic_stacktrace const& __other, allocator_type const& __alloc)
119-
: __alloc_(__alloc), __entries_(__other.__entries_, __alloc) {}
123+
: base(__alloc), __entries_(__other.__entries_, __alloc) {}
120124

121125
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace(basic_stacktrace&& __other, allocator_type const& __alloc)
122-
: __alloc_(__alloc) {
123-
if (__kAlwaysEqual || __alloc_ == __other.__alloc_) {
124-
__entries_ = std::move(__other.__entries_);
125-
} else {
126-
// "moving" from a container with a different allocator; we're forced to copy items instead
127-
for (auto const& __entry : __other.__entries_) {
128-
__entries_.push_back(__entry);
129-
}
130-
}
126+
: base(__alloc) {
127+
__entries_ = {std::move(__other.__entries_), __alloc_};
131128
}
132129

133130
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace& operator=(const basic_stacktrace& __other) {
134-
if (this == std::addressof(__other)) {
135-
return *this;
136-
}
137-
if (__kPropOnCopy) {
138-
__alloc_ = __other.__alloc_;
131+
if (this != std::addressof(__other)) {
132+
if (__kPropOnCopyAssign) {
133+
__alloc_ = __other.__alloc_;
134+
}
135+
__entries_ = {__other.__entries_, __alloc_};
139136
}
140-
__entries_ = {__other.__entries_, __alloc_};
141137
return *this;
142138
}
143139

144140
_LIBCPP_EXPORTED_FROM_ABI basic_stacktrace&
145-
operator=(basic_stacktrace&& __other) noexcept(__kPropOnMove || __kAlwaysEqual) {
146-
if (this == std::addressof(__other)) {
147-
return *this;
148-
}
149-
if (__kPropOnMove) {
150-
__alloc_ = __other.__alloc_;
151-
__entries_ = std::move(__other.__entries_);
152-
} else {
153-
auto __allocs_eq = __kAlwaysEqual || __alloc_ == __other.__alloc_;
154-
if (__allocs_eq) {
155-
__entries_ = std::move(__other.__entries_);
156-
} else {
157-
// "moving" from a container with a different allocator;
158-
// we're forced to copy items instead
159-
for (auto const& __entry : __other.__entries_) {
160-
__entries_.push_back(__entry);
161-
}
141+
operator=(basic_stacktrace&& __other) noexcept(__kPropOnMoveAssign || __kAlwaysEqual) {
142+
if (this != std::addressof(__other)) {
143+
if (__kPropOnMoveAssign) {
144+
__alloc_ = std::move(__other.__alloc_);
162145
}
146+
__entries_ = {std::move(__other.__entries_), __alloc_};
163147
}
164148
return *this;
165149
}
@@ -229,7 +213,9 @@ class _LIBCPP_EXPORTED_FROM_ABI basic_stacktrace {
229213
// (19.6.4.5)
230214
// [stacktrace.basic.mod], modifiers
231215

232-
_LIBCPP_EXPORTED_FROM_ABI void swap(basic_stacktrace<_Allocator>& __other) noexcept {
216+
_LIBCPP_EXPORTED_FROM_ABI void swap(basic_stacktrace& __other) noexcept(
217+
allocator_traits<_Allocator>::propagate_on_container_swap::value ||
218+
allocator_traits<_Allocator>::is_always_equal::value) {
233219
std::swap(__entries_, __other.__entries_);
234220
if (__kPropOnSwap) {
235221
std::swap(__alloc_, __other.__alloc_);

libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,9 @@
983983
{'is_defined': True, 'name': '__ZNSt3__112__stacktrace11__to_stringclERKNS_16stacktrace_entryE', 'type': 'FUNC'}
984984
{'is_defined': True, 'name': '__ZNSt3__112__stacktrace11__to_stringclERNS_13basic_ostreamIcNS_11char_traitsIcEEEEPKNS_16stacktrace_entryEm', 'type': 'FUNC'}
985985
{'is_defined': True, 'name': '__ZNSt3__112__stacktrace11__to_stringclERNS_13basic_ostreamIcNS_11char_traitsIcEEEERKNS_16stacktrace_entryE', 'type': 'FUNC'}
986-
{'is_defined': True, 'name': '__ZNSt3__112__stacktrace7builder16build_stacktraceEmm', 'type': 'FUNC'}
986+
{'is_defined': True, 'name': '__ZNSt3__112__stacktrace4base16build_stacktraceEmm', 'type': 'FUNC'}
987+
{'is_defined': True, 'name': '__ZNSt3__112__stacktrace4baseC1Ev', 'type': 'FUNC'}
988+
{'is_defined': True, 'name': '__ZNSt3__112__stacktrace4baseC2Ev', 'type': 'FUNC'}
987989
{'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD0Ev', 'type': 'FUNC'}
988990
{'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD1Ev', 'type': 'FUNC'}
989991
{'is_defined': True, 'name': '__ZNSt3__112bad_weak_ptrD2Ev', 'type': 'FUNC'}

libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,9 @@
627627
{'is_defined': True, 'name': '_ZNSt3__112__stacktrace11__to_stringclERKNS_16stacktrace_entryE', 'type': 'FUNC'}
628628
{'is_defined': True, 'name': '_ZNSt3__112__stacktrace11__to_stringclERNS_13basic_ostreamIcNS_11char_traitsIcEEEEPKNS_16stacktrace_entryEm', 'type': 'FUNC'}
629629
{'is_defined': True, 'name': '_ZNSt3__112__stacktrace11__to_stringclERNS_13basic_ostreamIcNS_11char_traitsIcEEEERKNS_16stacktrace_entryE', 'type': 'FUNC'}
630-
{'is_defined': True, 'name': '_ZNSt3__112__stacktrace7builder16build_stacktraceEmm', 'type': 'FUNC'}
630+
{'is_defined': True, 'name': '_ZNSt3__112__stacktrace4base16build_stacktraceEmm', 'type': 'FUNC'}
631+
{'is_defined': True, 'name': '_ZNSt3__112__stacktrace4baseC1Ev', 'type': 'FUNC'}
632+
{'is_defined': True, 'name': '_ZNSt3__112__stacktrace4baseC2Ev', 'type': 'FUNC'}
631633
{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD0Ev', 'type': 'FUNC'}
632634
{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD1Ev', 'type': 'FUNC'}
633635
{'is_defined': True, 'name': '_ZNSt3__112bad_weak_ptrD2Ev', 'type': 'FUNC'}
@@ -1624,9 +1626,13 @@
16241626
{'is_defined': True, 'name': '_ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 80, 'type': 'OBJECT'}
16251627
{'is_defined': True, 'name': '_ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 24, 'type': 'OBJECT'}
16261628
{'is_defined': True, 'name': '_ZTINSt12experimental19bad_optional_accessE', 'size': 24, 'type': 'OBJECT'}
1629+
{'is_defined': True, 'name': '_ZTINSt3__110__function6__baseIFPSt4bytemEEE', 'size': 16, 'type': 'OBJECT'}
16271630
{'is_defined': True, 'name': '_ZTINSt3__110__function6__baseIFbRKNS_12__stacktrace3elf6SymbolEEEE', 'size': 16, 'type': 'OBJECT'}
16281631
{'is_defined': True, 'name': '_ZTINSt3__110__function6__baseIFbRKNS_12__stacktrace3elf7SectionEEEE', 'size': 16, 'type': 'OBJECT'}
16291632
{'is_defined': True, 'name': '_ZTINSt3__110__function6__baseIFbRKNS_12__stacktrace4toolEEEE', 'size': 16, 'type': 'OBJECT'}
1633+
{'is_defined': True, 'name': '_ZTINSt3__110__function6__baseIFvPSt4bytemEEE', 'size': 16, 'type': 'OBJECT'}
1634+
{'is_defined': True, 'name': '_ZTINSt3__110__function6__funcIZNS_12__stacktrace12__alloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlmE_FPSt4bytemEEE', 'size': 24, 'type': 'OBJECT'}
1635+
{'is_defined': True, 'name': '_ZTINSt3__110__function6__funcIZNS_12__stacktrace14__dealloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlPvmE_FvPSt4bytemEEE', 'size': 24, 'type': 'OBJECT'}
16301636
{'is_defined': True, 'name': '_ZTINSt3__110__time_getE', 'size': 16, 'type': 'OBJECT'}
16311637
{'is_defined': True, 'name': '_ZTINSt3__110__time_putE', 'size': 16, 'type': 'OBJECT'}
16321638
{'is_defined': True, 'name': '_ZTINSt3__110ctype_baseE', 'size': 16, 'type': 'OBJECT'}
@@ -1764,11 +1770,17 @@
17641770
{'is_defined': True, 'name': '_ZTISt16nested_exception', 'size': 16, 'type': 'OBJECT'}
17651771
{'is_defined': True, 'name': '_ZTISt18bad_variant_access', 'size': 24, 'type': 'OBJECT'}
17661772
{'is_defined': True, 'name': '_ZTISt19bad_optional_access', 'size': 24, 'type': 'OBJECT'}
1773+
{'is_defined': True, 'name': '_ZTIZNSt3__112__stacktrace12__alloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlmE_', 'size': 16, 'type': 'OBJECT'}
1774+
{'is_defined': True, 'name': '_ZTIZNSt3__112__stacktrace14__dealloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlPvmE_', 'size': 16, 'type': 'OBJECT'}
17671775
{'is_defined': True, 'name': '_ZTSNSt12experimental15fundamentals_v112bad_any_castE', 'size': 50, 'type': 'OBJECT'}
17681776
{'is_defined': True, 'name': '_ZTSNSt12experimental19bad_optional_accessE', 'size': 40, 'type': 'OBJECT'}
1777+
{'is_defined': True, 'name': '_ZTSNSt3__110__function6__baseIFPSt4bytemEEE', 'size': 41, 'type': 'OBJECT'}
17691778
{'is_defined': True, 'name': '_ZTSNSt3__110__function6__baseIFbRKNS_12__stacktrace3elf6SymbolEEEE', 'size': 64, 'type': 'OBJECT'}
17701779
{'is_defined': True, 'name': '_ZTSNSt3__110__function6__baseIFbRKNS_12__stacktrace3elf7SectionEEEE', 'size': 65, 'type': 'OBJECT'}
17711780
{'is_defined': True, 'name': '_ZTSNSt3__110__function6__baseIFbRKNS_12__stacktrace4toolEEEE', 'size': 58, 'type': 'OBJECT'}
1781+
{'is_defined': True, 'name': '_ZTSNSt3__110__function6__baseIFvPSt4bytemEEE', 'size': 42, 'type': 'OBJECT'}
1782+
{'is_defined': True, 'name': '_ZTSNSt3__110__function6__funcIZNS_12__stacktrace12__alloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlmE_FPSt4bytemEEE', 'size': 126, 'type': 'OBJECT'}
1783+
{'is_defined': True, 'name': '_ZTSNSt3__110__function6__funcIZNS_12__stacktrace14__dealloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlPvmE_FvPSt4bytemEEE', 'size': 131, 'type': 'OBJECT'}
17721784
{'is_defined': True, 'name': '_ZTSNSt3__110__time_getE', 'size': 21, 'type': 'OBJECT'}
17731785
{'is_defined': True, 'name': '_ZTSNSt3__110__time_putE', 'size': 21, 'type': 'OBJECT'}
17741786
{'is_defined': True, 'name': '_ZTSNSt3__110ctype_baseE', 'size': 21, 'type': 'OBJECT'}
@@ -1906,6 +1918,8 @@
19061918
{'is_defined': True, 'name': '_ZTSSt16nested_exception', 'size': 21, 'type': 'OBJECT'}
19071919
{'is_defined': True, 'name': '_ZTSSt18bad_variant_access', 'size': 23, 'type': 'OBJECT'}
19081920
{'is_defined': True, 'name': '_ZTSSt19bad_optional_access', 'size': 24, 'type': 'OBJECT'}
1921+
{'is_defined': True, 'name': '_ZTSZNSt3__112__stacktrace12__alloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlmE_', 'size': 90, 'type': 'OBJECT'}
1922+
{'is_defined': True, 'name': '_ZTSZNSt3__112__stacktrace14__dealloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlPvmE_', 'size': 94, 'type': 'OBJECT'}
19091923
{'is_defined': True, 'name': '_ZTTNSt3__110istrstreamE', 'size': 32, 'type': 'OBJECT'}
19101924
{'is_defined': True, 'name': '_ZTTNSt3__110ostrstreamE', 'size': 32, 'type': 'OBJECT'}
19111925
{'is_defined': True, 'name': '_ZTTNSt3__112__stacktrace10fd_istreamE', 'size': 32, 'type': 'OBJECT'}
@@ -1922,6 +1936,8 @@
19221936
{'is_defined': True, 'name': '_ZTTNSt3__19strstreamE', 'size': 80, 'type': 'OBJECT'}
19231937
{'is_defined': True, 'name': '_ZTVNSt12experimental15fundamentals_v112bad_any_castE', 'size': 40, 'type': 'OBJECT'}
19241938
{'is_defined': True, 'name': '_ZTVNSt12experimental19bad_optional_accessE', 'size': 40, 'type': 'OBJECT'}
1939+
{'is_defined': True, 'name': '_ZTVNSt3__110__function6__funcIZNS_12__stacktrace12__alloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlmE_FPSt4bytemEEE', 'size': 88, 'type': 'OBJECT'}
1940+
{'is_defined': True, 'name': '_ZTVNSt3__110__function6__funcIZNS_12__stacktrace14__dealloc_wrapINS_9allocatorINS_16stacktrace_entryEEEEEDaRKT_EUlPvmE_FvPSt4bytemEEE', 'size': 88, 'type': 'OBJECT'}
19251941
{'is_defined': True, 'name': '_ZTVNSt3__110istrstreamE', 'size': 80, 'type': 'OBJECT'}
19261942
{'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIcLb0EEE', 'size': 112, 'type': 'OBJECT'}
19271943
{'is_defined': True, 'name': '_ZTVNSt3__110moneypunctIcLb1EEE', 'size': 112, 'type': 'OBJECT'}

libcxx/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ set(LIBCXX_SOURCES
4040
ryu/d2fixed.cpp
4141
ryu/d2s.cpp
4242
ryu/f2s.cpp
43-
stacktrace/builder.cpp
43+
stacktrace/base.cpp
4444
stacktrace/linux/elf.cpp
4545
stacktrace/linux/images.cpp
4646
stacktrace/linux/impl.cpp

libcxx/src/stacktrace/builder.cpp renamed to libcxx/src/stacktrace/base.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
2121

2222
namespace __stacktrace {
2323

24+
base::base() : base(std::allocator<std::stacktrace_entry>()) {}
25+
2426
_LIBCPP_NO_TAIL_CALLS _LIBCPP_NOINLINE _LIBCPP_EXPORTED_FROM_ABI void
25-
builder::build_stacktrace(size_t skip, size_t max_depth) {
27+
base::build_stacktrace(size_t skip, size_t max_depth) {
2628
#if defined(_LIBCPP_WIN32API)
2729
// Windows implementation
2830
win_impl dbghelp{*this};

0 commit comments

Comments
 (0)