From b406a2d3e30b1930ea3dc812bd1c4422ae135d14 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Wed, 16 Mar 2011 12:46:01 +0100 Subject: [PATCH] valgrind: ignore SSE-based strlen invalid reads MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Some versions of strlen use SSE to speed up the calculation and load 4 bytes at a time, even if it means reading past the end of the allocated memory. This read is safe and when the strlen function is inlined, it is not replaced by valgrind, which reports a false-possitive. Tell valgrind to ignore this particular error, as the read is, in fact, safe. Current upstream-released version 3.6.1 is affected. Some distributions have this fixed in their latest versions. Signed-off-by: Carlos Martín Nieto Signed-off-by: Junio C Hamano --- t/valgrind/default.supp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/t/valgrind/default.supp b/t/valgrind/default.supp index 9e013fa3b2..0a6724fcc4 100644 --- a/t/valgrind/default.supp +++ b/t/valgrind/default.supp @@ -43,3 +43,9 @@ fun:write_buffer fun:write_loose_object } + +{ + ignore-sse-strlen-invalid-read-size + Memcheck:Addr4 + fun:copy_ref +} -- 2.11.4.GIT