================
@@ -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
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to