[x265] [PATCH 2 of 2] alloc extra 32 bytes to avoid Valgrind read beyond warning

chen chenm003 at 163.com
Tue Dec 29 17:11:12 CET 2015


Warning only



At 2015-12-29 19:46:10,"Deepthi Nandakumar" <deepthi at multicorewareinc.com> wrote:

Did this cause a segfault etc (does it reference an issue), or just a valgrind warning?



On Tue, Dec 29, 2015 at 4:06 AM, Min Chen <chenm003 at 163.com> wrote:
# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1451340415 21600
# Node ID 71a95cc2b7c9c5b9090e598570a6e8a37baa88fb
# Parent  f8daf6c38fec27b8b01f3a01df19c5a2252382b9
alloc extra 32 bytes to avoid Valgrind read beyond warning
---
 source/encoder/sao.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff -r f8daf6c38fec -r 71a95cc2b7c9 source/encoder/sao.cpp
--- a/source/encoder/sao.cpp    Mon Dec 28 16:06:52 2015 -0600
+++ b/source/encoder/sao.cpp    Mon Dec 28 16:06:55 2015 -0600
@@ -114,7 +114,7 @@

         // SAO asm code will read 1 pixel before and after, so pad by 2
         // NOTE: m_param->sourceWidth+2 enough, to avoid condition check in copySaoAboveRef(), I alloc more up to 63 bytes in here
-        CHECKED_MALLOC(m_tmpU[i], pixel, m_numCuInWidth * g_maxCUSize + 2);
+        CHECKED_MALLOC(m_tmpU[i], pixel, m_numCuInWidth * g_maxCUSize + 2 + 32);
         m_tmpU[i] += 1;
     }


_______________________________________________
x265-devel mailing list
x265-devel at videolan.org
https://mailman.videolan.org/listinfo/x265-devel




--

Deepthi Nandakumar

Engineering Manager, x265

Multicoreware, Inc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20151230/bfa65bf8/attachment.html>


More information about the x265-devel mailing list