We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7839c19 + da31a02 commit 1bb4e80Copy full SHA for 1bb4e80
lldb/source/Plugins/LanguageRuntime/Swift/ReflectionContext.cpp
@@ -246,7 +246,9 @@ class TargetReflectionContext : public ReflectionContextInterface {
246
swift::reflection::DescriptorFinder *descriptor_finder,
247
const swift::reflection::TypeRef *tr,
248
std::function<bool(SuperClassType)> fn) override {
249
- while (tr) {
+ // Guard against faulty self-referential metadata.
250
+ unsigned limit = 256;
251
+ while (tr && --limit) {
252
if (fn({[=]() -> const swift::reflection::RecordTypeInfo * {
253
auto ti_or_err = GetRecordTypeInfo(*tr, tip, descriptor_finder);
254
if (!ti_or_err) {
0 commit comments