[Lldb-commits] [PATCH] D72086: [lldb] Fix that SBThread.GetStopDescription is returning strings with uninitialized memory at the end.
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 7 03:51:03 PST 2020
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
This is fine. It also sounds like a good idea to solve the +1 vs snprintf inconsistency.
================
Comment at: lldb/scripts/Python/python-typemaps.swig:124-125
} else {
- llvm::StringRef ref(static_cast<const char*>($1), result);
+ const char *cstr = static_cast<const char*>($1);
+ llvm::StringRef ref(cstr, strlen(cstr));
PythonString string(ref);
----------------
This is just `StringRef ref = $1`, right ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72086/new/
https://reviews.llvm.org/D72086
More information about the lldb-commits
mailing list