From dfe01818fe3044b22dfd9a49d3275b19df1fca1a Mon Sep 17 00:00:00 2001 From: yangguo Date: Thu, 30 Apr 2015 07:32:24 -0700 Subject: [PATCH] Initialize typed array content for rempio2result during bootstrapping. This is to pacify MSAN. R=mvstanton@chromium.org BUG=465759 LOG=N Review URL: https://codereview.chromium.org/1119693004 Cr-Commit-Position: refs/heads/master@{#28170} --- src/bootstrapper.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index 4117ce07e5..6b1c6dd48e 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -1645,8 +1645,10 @@ void Genesis::InitializeBuiltinTypedArrays() { { // Initialize a result array for rempio2 calculation const size_t num_elements = 2; - SetBuiltinTypedArray(isolate(), builtins, kExternalFloat64Array, - NULL, num_elements, "rempio2result"); + double* data = + SetBuiltinTypedArray(isolate(), builtins, kExternalFloat64Array, + NULL, num_elements, "rempio2result"); + for (size_t i = 0; i < num_elements; i++) data[i] = 0; } }