git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH] ignore memcmp() overreading in bsearch() callback
@ 2013-01-14 23:36 Junio C Hamano
  2013-01-14 23:56 ` Johannes Schindelin
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Junio C Hamano @ 2013-01-14 23:36 UTC (permalink / raw)
  To: git; +Cc: Jeff King, Carlos Martín Nieto, Johannes Schindelin

It appears that memcmp() uses the usual "one word at a time"
comparison and triggers valgrind in a callback of bsearch() used in
the refname search.  I can easily trigger problems in any script
with test_commit (e.g. "sh t0101-at-syntax.sh --valgrind -i -v")
without this suppression.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/valgrind/default.supp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/t/valgrind/default.supp b/t/valgrind/default.supp
index 0a6724f..032332f 100644
--- a/t/valgrind/default.supp
+++ b/t/valgrind/default.supp
@@ -49,3 +49,11 @@
 	Memcheck:Addr4
 	fun:copy_ref
 }
+
+{
+	ignore-memcmp-reading-too-much-in-bsearch-callback
+	Memcheck:Addr4
+	fun:ref_entry_cmp_sslice
+	fun:bsearch
+	fun:search_ref_dir
+}

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-16  1:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-14 23:36 [RFC/PATCH] ignore memcmp() overreading in bsearch() callback Junio C Hamano
2013-01-14 23:56 ` Johannes Schindelin
2013-01-15  2:45   ` Junio C Hamano
2013-01-15 15:50 ` Jeff King
2013-01-15 16:55   ` Junio C Hamano
2013-01-15 17:18     ` Jeff King
2013-01-15 15:55 ` René Scharfe
2013-01-15 20:27   ` Andreas Schwab
2013-01-16  1:08     ` René Scharfe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).