[Lldb-commits] [PATCH] D55653: [lldb-mi] Check raw pointers before passing them to std::string ctor/assignment

Tatyana Krasnukha via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Feb 16 20:02:32 PST 2019


tatyana-krasnukha updated this revision to Diff 187153.
tatyana-krasnukha retitled this revision from "Check pointer results on nullptr before using them" to "[lldb-mi] Check raw pointers before passing them to std::string ctor/assignment".
tatyana-krasnukha added a comment.
Herald added subscribers: jfb, mgorny.

Thank you for mentioning StringRef, you gave me the idea to keep pointers check inside the CMIUtilString to obviate undefined behavior. This is the best place to do it, however, a caller still should examine pointers he passes to CMIUtilString::Format as the ellipsis parameter.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55653/new/

https://reviews.llvm.org/D55653

Files:
  tools/lldb-mi/MICmdCmdMiscellanous.cpp
  tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
  tools/lldb-mi/MICmnLLDBDebugger.cpp
  tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
  tools/lldb-mi/MICmnMIResultRecord.cpp
  tools/lldb-mi/MIDriverMgr.cpp
  tools/lldb-mi/MIUtilString.cpp
  tools/lldb-mi/MIUtilString.h
  unittests/tools/CMakeLists.txt
  unittests/tools/lldb-mi/CMakeLists.txt
  unittests/tools/lldb-mi/utils/CMakeLists.txt
  unittests/tools/lldb-mi/utils/StringTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55653.187153.patch
Type: text/x-patch
Size: 10241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190217/903d2e74/attachment.bin>


More information about the lldb-commits mailing list