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

Unified Diff: src/sampler.cc

Issue 1348493003: Fix MSAN warning after r30777 (try 2) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sampler.cc
diff --git a/src/sampler.cc b/src/sampler.cc
index a01ebaaef86f9a9e7916e5b8902eaa2a02ce4b50..5a7aac71bb31467ce4f1fcccf66fe7ff36b723fb 100644
--- a/src/sampler.cc
+++ b/src/sampler.cc
@@ -184,7 +184,7 @@ bool IsSamePage(byte* ptr1, byte* ptr2) {
// Check if the code at specified address could potentially be a
// frame setup code.
-DISABLE_ASAN bool IsNoFrameRegion(Address address) {
+bool IsNoFrameRegion(Address address) {
struct Pattern {
int bytes_count;
byte bytes[8];
@@ -219,6 +219,7 @@ DISABLE_ASAN bool IsNoFrameRegion(Address address) {
for (int* offset_ptr = pattern->offsets; *offset_ptr != -1; ++offset_ptr) {
int offset = *offset_ptr;
if (!offset || IsSamePage(pc, pc - offset)) {
+ MSAN_MEMORY_IS_INITIALIZED(pc - offset, pattern->bytes_count);
if (!memcmp(pc - offset, pattern->bytes, pattern->bytes_count))
return true;
} else {
@@ -226,6 +227,7 @@ DISABLE_ASAN bool IsNoFrameRegion(Address address) {
// allocated thus causing a SEGFAULT.
// Check the pattern part that's on the same page and
// pessimistically assume it could be the entire pattern match.
+ MSAN_MEMORY_IS_INITIALIZED(pc, pattern->bytes_count - offset);
if (!memcmp(pc, pattern->bytes + offset, pattern->bytes_count - offset))
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698