Commit fcb46467 authored by jackychen's avatar jackychen
Browse files

vpx_scale: fix the issue in msan test.

Do memset to fix msan issue due to the access of uninitialized


Change-Id: I02f995ede79e3574e72587cc078df1a0d11af002
parent 082434b2
......@@ -203,6 +203,15 @@ int vpx_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
return -1;
ybf->buffer_alloc = (uint8_t *)yv12_align_addr(fb->data, 32);
#if defined(__has_feature)
#if __has_feature(memory_sanitizer)
// This memset is needed for fixing the issue of using uninitialized
// value in msan test. It will cause a perf loss, so only do this for
// msan test.
memset(ybf->buffer_alloc, 0, (int)frame_size);
} else if (frame_size > (size_t)ybf->buffer_alloc_sz) {
// Allocation to hold larger frame, or first allocation.
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