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
This commit is contained in:
parent
75de4f827f
commit
8f25c667ea
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user