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

Unified Diff: runtime/vm/native_symbol_linux.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 | « runtime/vm/native_entry.cc ('k') | runtime/vm/os_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_symbol_linux.cc
diff --git a/runtime/vm/native_symbol_linux.cc b/runtime/vm/native_symbol_linux.cc
index a903938b36fcf4a03c0b6b73e5c09c5c77a24547..120ef9a9ae100c2e3957b5759278e2c22ee9136e 100644
--- a/runtime/vm/native_symbol_linux.cc
+++ b/runtime/vm/native_symbol_linux.cc
@@ -5,6 +5,7 @@
#include "vm/globals.h"
#if defined(TARGET_OS_LINUX)
+#include "platform/memory_sanitizer.h"
#include "vm/native_symbol.h"
#include <cxxabi.h> // NOLINT
@@ -32,8 +33,10 @@ char* NativeSymbolResolver::LookupSymbolName(uintptr_t pc, uintptr_t* start) {
if (start != NULL) {
*start = reinterpret_cast<uintptr_t>(info.dli_saddr);
}
- int status;
- char* demangled = abi::__cxa_demangle(info.dli_sname, NULL, NULL, &status);
+ int status = 0;
+ size_t len = 0;
+ char* demangled = abi::__cxa_demangle(info.dli_sname, NULL, &len, &status);
+ MSAN_UNPOISON(demangled, len);
if (status == 0) {
return demangled;
}
« no previous file with comments | « runtime/vm/native_entry.cc ('k') | runtime/vm/os_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698