From 5d1a9b09f32181f978a834b286914ce466be688e Mon Sep 17 00:00:00 2001 From: yangguo Date: Wed, 11 Feb 2015 06:03:10 -0800 Subject: [PATCH] Whitelist serialized objects wrt MSAN. R=jochen@chromium.org BUG=chromium:457459 LOG=N Review URL: https://codereview.chromium.org/919613002 Cr-Commit-Position: refs/heads/master@{#26578} --- src/serialize.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/serialize.cc b/src/serialize.cc index 887276f9cf..b7277b5da5 100644 --- a/src/serialize.cc +++ b/src/serialize.cc @@ -2120,6 +2120,10 @@ int Serializer::ObjectSerializer::OutputRawData( } const char* description = code_object_ ? "Code" : "Byte"; +#ifdef MEMORY_SANITIZER + // Object sizes are usually rounded up with uninitialized padding space. + MSAN_MEMORY_IS_INITIALIZED(object_start + base, bytes_to_output); +#endif // MEMORY_SANITIZER sink_->PutRaw(object_start + base, bytes_to_output, description); if (code_object_) delete[] object_start; }