Skip to content

Commit b406a2d

Browse files
carlosmngitster
authored andcommitted
valgrind: ignore SSE-based strlen invalid reads
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 808a95d commit b406a2d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/valgrind/default.supp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@
4343
fun:write_buffer
4444
fun:write_loose_object
4545
}
46+
47+
{
48+
ignore-sse-strlen-invalid-read-size
49+
Memcheck:Addr4
50+
fun:copy_ref
51+
}

0 commit comments

Comments
 (0)