[Lldb-commits] [PATCH] D141318: [lldb] Store shared pointers in DieToTypePtr map instead of raw pointers

Augusto Noronha via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 9 12:50:37 PST 2023


augusto2112 created this revision.
augusto2112 added reviewers: labath, clayborg, aprantl.
Herald added a reviewer: shafik.
Herald added a project: All.
augusto2112 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Storing raw pointers in DieToTypePtr may cause use-after-frees to occur,
since there are no guarantees that the shared pointers that owns the
underlying pointer to the type are kept around as long as the map.
Change the map to store a shared pointer instead.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141318

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141318.487534.patch
Type: text/x-patch
Size: 12438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230109/18eaec1b/attachment.bin>


More information about the lldb-commits mailing list