Skip to content

Commit 3e1cdea

Browse files
author
git apple-llvm automerger
committed
Merge commit '1bb4e805291a' from swift/release/6.2 into stable/20240723
2 parents 6902e37 + 1bb4e80 commit 3e1cdea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/ReflectionContext.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ class TargetReflectionContext : public ReflectionContextInterface {
246246
swift::reflection::DescriptorFinder *descriptor_finder,
247247
const swift::reflection::TypeRef *tr,
248248
std::function<bool(SuperClassType)> fn) override {
249-
while (tr) {
249+
// Guard against faulty self-referential metadata.
250+
unsigned limit = 256;
251+
while (tr && --limit) {
250252
if (fn({[=]() -> const swift::reflection::RecordTypeInfo * {
251253
auto ti_or_err = GetRecordTypeInfo(*tr, tip, descriptor_finder);
252254
if (!ti_or_err) {

0 commit comments

Comments
 (0)