Tell MSAN that profiler doesn't expect sp to point at initialized memory
authoryurys <yurys@chromium.org>
Tue, 29 Sep 2015 08:18:57 +0000 (01:18 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 29 Sep 2015 08:19:04 +0000 (08:19 +0000)
BUG=v8:4444,v8:4151
LOG=N

Review URL: https://codereview.chromium.org/1371253002

Cr-Commit-Position: refs/heads/master@{#30996}

src/profiler/sampler.cc

index 8f01e4f17b110f994037b5d1376b79e933cb9dd9..dc4c4c4f06d49e4c4758121ad9449b3c2076153d 100644 (file)
@@ -682,6 +682,9 @@ DISABLE_ASAN void TickSample::Init(Isolate* isolate,
     external_callback = scope->callback();
     has_external_callback = true;
   } else {
+    // sp register may point at an arbitrary place in memory, make
+    // sure MSAN doesn't complain about it.
+    MSAN_MEMORY_IS_INITIALIZED(regs.sp, sizeof(Address));
     // Sample potential return address value for frameless invocation of
     // stubs (we'll figure out later, if this value makes sense).
     tos = Memory::Address_at(reinterpret_cast<Address>(regs.sp));