llvm-project/lldb/test
Raphael Isemann 939ca455e7 [lldb] Fix string summary of an empty NSPathStore2
Summary:
Printing a summary for an empty NSPathStore2 string currently prints random bytes behind the empty string pointer from memory (rdar://55575888).

It seems the reason for this is that the SourceSize parameter in the `ReadStringAndDumpToStreamOptions` - which is supposed to contain the string
length - actually uses the length 0 as a magic value for saying "read as much as possible from the buffer" which is clearly wrong for empty strings.

This patch adds another flag that indicates if we have know the string length or not and makes this behaviour dependent on that (which seemingly
was the original purpose of this magic value).

Reviewers: aprantl, JDevlieghere, shafik

Reviewed By: aprantl

Subscribers: christof, abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D68010
2020-03-19 12:20:35 +01:00
..
API [lldb] Fix string summary of an empty NSPathStore2 2020-03-19 12:20:35 +01:00
Shell [lldb] [testsuite] Enable forgotten -gsplit-dwarf for 2 testfiles 2020-03-18 15:49:24 +01:00
Unit [CMake] Split logic across test suite subdirectories (NFC) 2019-10-24 10:58:22 -07:00
CMakeLists.txt [lldb/DWARF] Fix dwp search path in the separate-debug-file case 2020-02-24 17:01:15 +01:00
lit.cfg.py [test] Cleanup top-level lit.cfg.py 2019-10-10 19:51:47 +00:00
lit.site.cfg.py.in Re-land "[test] Split LLDB tests into API, Shell & Unit" 2019-10-09 19:22:02 +00:00