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

Unified Diff: runtime/vm/os_linux.cc

Issue 2383293003: - fix some cases where we are using uninitialized memory (Closed)
Patch Set: address self code review. Created 4 years, 3 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
Index: runtime/vm/os_linux.cc
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc
index 12dd6461b5977058b12ec1b30ed71d765d34899c..7f5eff7eb2217004ea66d48c1e540654946dc1f0 100644
--- a/runtime/vm/os_linux.cc
+++ b/runtime/vm/os_linux.cc
@@ -19,6 +19,7 @@
#include <fcntl.h> // NOLINT
#include <unistd.h> // NOLINT
+#include "platform/memory_sanitizer.h"
#include "platform/utils.h"
#include "vm/code_observers.h"
#include "vm/dart.h"
@@ -321,6 +322,7 @@ int OS::SNPrint(char* str, size_t size, const char* format, ...) {
int OS::VSNPrint(char* str, size_t size, const char* format, va_list args) {
+ MSAN_UNPOISON(str, size);
int retval = vsnprintf(str, size, format, args);
if (retval < 0) {
FATAL1("Fatal error in OS::VSNPrint with format '%s'", format);

Powered by Google App Engine
This is Rietveld 408576698