[Lldb-commits] [PATCH] D73860: [lldb/StringPrinter] Avoid reading garbage in uninitialized strings

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Feb 4 16:14:06 PST 2020


vsk updated this revision to Diff 242461.
vsk added a reviewer: LLDB.
vsk added a comment.

- Enhance test coverage with several more examples of garbage long-mode std::strings.
- In several cases, when we detected an invalid string, we would fall back to spewing the "raw mode" representation of the ValueObject to the user. Use a ScopeExit to make sure we never do that.
- Detect when the `GetPointeeData` call for the long-mode payload fails, and do not attempt to read the full payload when this happens.


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

https://reviews.llvm.org/D73860

Files:
  lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
  lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp
  lldb/source/DataFormatters/StringPrinter.cpp
  lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73860.242461.patch
Type: text/x-patch
Size: 14595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200205/d0b3daca/attachment-0001.bin>


More information about the lldb-commits mailing list