[Lldb-commits] [lldb] [lldb] Limit formatter-section extractor range (PR #140139)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Thu Feb 12 06:43:52 PST 2026
================
@@ -57,11 +57,15 @@ static void ForEachFormatterInModule(
cursor.seek(cursor.tell() - 1);
break;
}
+ if (!cursor || cursor.tell() >= section_size)
+ break;
----------------
Michael137 wrote:
The idiomatic way of iterating through the entirety of a `DataExtractor` is to check `section.eof(cursor)` in all the places where we explicitly check against section_size. And the padding skipping should just be a separate loop before we actually start reading the data. Then we wouldn't need an extra check here.
So could we just move the padding loop out? (and use `eof` checks, but that's optional).
https://github.com/llvm/llvm-project/pull/140139
More information about the lldb-commits
mailing list