[Lldb-commits] [PATCH] D41584: Check existence of each required component during construction of LLVMCDisassembler.

Tatyana Krasnukha via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 26 08:11:38 PST 2017


tatyana-krasnukha created this revision.
tatyana-krasnukha added reviewers: zturner, clayborg, jingham, jasonmolenda.

Actually, fix two issues:

1. remove repeat creation of reg_info, use m_reg_info_ap  for createMCAsmInfo instead;
2. remove possibility to dereference nullptr during createMCAsmInfo invocation, that could lead to undefined behavior.

Placed checking of a component right after its creation to simplify the code and avoid same issues later.


Repository:
  rL LLVM

https://reviews.llvm.org/D41584

Files:
  source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41584.128174.patch
Type: text/x-patch
Size: 95662 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171226/a584b824/attachment-0001.bin>


More information about the lldb-commits mailing list