[Lldb-commits] [lldb] [lldb][NFC] Module, ModuleSpec, GetSectionData use DataExtractorSP (PR #178347)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 29 01:54:32 PST 2026
================
@@ -70,24 +70,30 @@ ObjectFile *ObjectFileBreakpad::CreateInstance(const ModuleSP &module_sp,
extractor_sp = std::make_shared<DataExtractor>(data_sp);
data_offset = 0;
}
- auto text = toStringRef(extractor_sp->GetSharedDataBuffer()->GetData());
+ // If this is opearting on a VirtualDataExtractor, it can have
+ // gaps between valid bytes in the DataBuffer. We extract an
+ // ArrayRef of the raw bytes, and can segfault.
+ DataExtractorSP contiguous_extractor_sp =
+ extractor_sp->GetSubsetExtractorSP(0);
----------------
JDevlieghere wrote:
I'll defer to you, but if we want to stick with passing zero, I think we should add the `/*offset=*/0`.
https://github.com/llvm/llvm-project/pull/178347
More information about the lldb-commits
mailing list