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.
1 parent cf4a54e commit da31a02Copy full SHA for da31a02
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
LLDB_LOG_ERRORV(GetLog(LLDBLog::Types), ti_or_err.takeError(),
0 commit comments