[Lldb-commits] [lldb] [lldb] Don't dereference a possibly null DataExtractor in FindPlugin (PR #224347)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 17 16:55:38 PDT 2026
jasonmolenda wrote:
It's hard for me to tell what this code was meant to do originally; your change seems equivalent to what it did before,
```
if (!data_sp || data_sp->GetByteSize() == 0) {
[.... a bunch of lines that don't set data_sp ...]
// Check if this is a object container by iterating through all
// object container plugin instances and then trying to get an
// object file from the container plugins since we had a name.
// Also, don't read
// ANY data in case there is data cached in the container plug-ins
// (like BSD archives caching the contained objects within an
// file).
ObjectFileSP object_file_sp = CreateObjectFromContainer(
module_sp, file, file_offset, file_size, data_sp, data_offset);
```
and you're right, this is doing `if (!extractor_sp) ... extractor_sp->GetSharedDataBuffer` which is extra doomed.
I think this is fine.
https://github.com/llvm/llvm-project/pull/224347
More information about the lldb-commits
mailing list