llvm-project/lldb
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
..
bindings [lldb/Bindings] Check that process isn't None before calling is_alive. 2020-03-17 17:06:04 -07:00
cmake [lldb][cmake] Move remove_module_flags macro to AddLLDB.cmake 2020-03-06 17:21:24 -08:00
docs Revert "Revert "[lldb/Docs] Mark both Python 3.6 and 3.8 as supported on Windows"" 2020-03-03 20:43:16 +01:00
examples [lldb] Make gdbremote.py utility py2and3 compatible 2020-02-13 09:18:55 +01:00
include/lldb [lldb] Fix string summary of an empty NSPathStore2 2020-03-19 12:20:35 +01:00
packages/Python/lldbsuite [lldb/Target] Support more than 2 symbols in StackFrameRecognizer 2020-03-18 14:15:58 +01:00
resources [CMake] Revised LLDB.framework builds 2019-01-04 12:46:50 +00:00
scripts [lldb/Scripts] Remove swig_bot_lib/__init__.py 2020-01-16 09:15:41 -08:00
source [lldb] Fix string summary of an empty NSPathStore2 2020-03-19 12:20:35 +01:00
test [lldb] Fix string summary of an empty NSPathStore2 2020-03-19 12:20:35 +01:00
third_party/Python/module Increase timeout in pexpect to lower chances of tests failing under ASAN. 2019-10-10 16:16:49 +00:00
tools Update so debugserver can be built on macos again with xcodebuild. 2020-03-18 21:46:20 -07:00
unittests [lldb/PlatformDarwin] Expose current toolchain and CL tools directory 2020-03-18 15:08:24 -07:00
utils [lldb/Utils] Use PYTHON_EXECUTABLE to configure lldb-dotest's shebang 2020-03-15 20:34:17 -07:00
.clang-format
.clang-tidy [lldb] Add .clang-tidy with customization to disable readability-identifier-naming 2020-03-09 12:50:28 -07:00
.gitignore Add .noindex to the gitignore 2019-04-05 17:57:42 +00:00
CMakeLists.txt [lldb/Cmake] Add a CMakeLists.txt to the utils directory... 2020-01-16 22:31:01 -08:00
CODE_OWNERS.txt [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
use_lldb_suite_root.py