[PATCH] D103716: [scudo] Fix String DCHECK
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 4 13:42:21 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5019b0a56588: [scudo] Fix String DCHECK (authored by cryptoad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103716/new/
https://reviews.llvm.org/D103716
Files:
compiler-rt/lib/scudo/standalone/string_utils.h
Index: compiler-rt/lib/scudo/standalone/string_utils.h
===================================================================
--- compiler-rt/lib/scudo/standalone/string_utils.h
+++ compiler-rt/lib/scudo/standalone/string_utils.h
@@ -18,14 +18,12 @@
class ScopedString {
public:
- explicit ScopedString() : String() {
- if (String.capacity() > 0)
- String[0] = '\0';
- }
+ explicit ScopedString() : String() {}
uptr length() { return Length; }
const char *data() { return String.data(); }
void clear() {
- String[0] = '\0';
+ if (!String.empty())
+ String[0] = '\0';
Length = 0;
}
void append(const char *Format, va_list Args);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103716.349962.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210604/d281d8c6/attachment.bin>
More information about the llvm-commits
mailing list