Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1074)

Unified Diff: runtime/bin/dartutils.cc

Issue 2383293003: - fix some cases where we are using uninitialized memory (Closed)
Patch Set: Fix lint issue. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/platform/assert.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index e7237641bb8d0b94897ea46d154758fed0e3f50b..1415cb1750f5946497735fe851ed9c5dbd294969 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -18,6 +18,7 @@
#include "platform/assert.h"
#include "platform/globals.h"
+#include "platform/memory_sanitizer.h"
// Return the error from the containing function if handle is in error handle.
#define RETURN_IF_ERROR(handle) \
@@ -927,6 +928,7 @@ Dart_Handle DartUtils::NewError(const char* format, ...) {
va_end(args);
char* buffer = reinterpret_cast<char*>(Dart_ScopeAllocate(len + 1));
+ MSAN_UNPOISON(buffer, (len + 1));
va_list args2;
va_start(args2, format);
vsnprintf(buffer, (len + 1), format, args2);
« no previous file with comments | « no previous file | runtime/platform/assert.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698