diff options
author | 2015-01-22 10:40:20 -0800 | |
---|---|---|
committer | 2015-01-22 10:40:20 -0800 | |
commit | 8f25c667ea975c92d87ad6cb96963946f9845542 (patch) | |
tree | da752a7b3eadc7be46a103cd41e23e06ada9e816 /src | |
parent | 75de4f827fcc92ec129ba872924f6e81c55aa8f0 (diff) |
Initialize the pad memory in GrBufferAllocPool.
Msan bot detects Use-of-uninitialized-value on the pad.
BUG=445745
Review URL: https://codereview.chromium.org/865913002
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrBufferAllocPool.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp index 26a1d15837..f23311877b 100644 --- a/src/gpu/GrBufferAllocPool.cpp +++ b/src/gpu/GrBufferAllocPool.cpp @@ -184,6 +184,7 @@ void* GrBufferAllocPool::makeSpace(size_t size, size_t pad = GrSizeAlignUpPad(usedBytes, alignment); if ((size + pad) <= back.fBytesFree) { + memset((void*)(reinterpret_cast<intptr_t>(fBufferPtr) + usedBytes), 0, pad); usedBytes += pad; *offset = usedBytes; *buffer = back.fBuffer; |