Commit 69241d65 authored by jar@chromium.org's avatar jar@chromium.org

Suppress unitialized use of memory for random_number_ seed

I'm going to TBR this, since it causes a bunch of redness
on the tree, and is really a supression.

tbr=rtenneti,mk
bug=106326
Review URL: http://codereview.chromium.org/8792005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112937 0039d316-1c4b-4281-b951-d872f2087c98
parent af824368
......@@ -9,6 +9,7 @@
#include "base/format_macros.h"
#include "base/message_loop.h"
#include "base/stringprintf.h"
#include "base/third_party/valgrind/memcheck.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h"
#include "base/port.h"
......@@ -218,6 +219,8 @@ ThreadData::ThreadData(int thread_number)
ThreadData::~ThreadData() {}
void ThreadData::PushToHeadOfList() {
VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(&random_number_,
sizeof(random_number_));
// Toss in a hint of randomness (atop the uniniitalized value).
random_number_ += static_cast<int32>(this - static_cast<ThreadData*>(0));
random_number_ ^= (Now() - TrackedTime()).InMilliseconds();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment