aboutsummaryrefslogtreecommitdiff
path: root/gl/memchr.valgrind
diff options
context:
space:
mode:
Diffstat (limited to 'gl/memchr.valgrind')
-rw-r--r--gl/memchr.valgrind14
1 files changed, 14 insertions, 0 deletions
diff --git a/gl/memchr.valgrind b/gl/memchr.valgrind
new file mode 100644
index 00000000..60f247e1
--- /dev/null
+++ b/gl/memchr.valgrind
@@ -0,0 +1,14 @@
+# Suppress a valgrind message about use of uninitialized memory in memchr().
+# POSIX states that when the character is found, memchr must not read extra
+# bytes in an overestimated length (for example, where memchr is used to
+# implement strnlen). However, we use a safe word read to provide a speedup.
+{
+ memchr-value4
+ Memcheck:Value4
+ fun:rpl_memchr
+}
+{
+ memchr-value8
+ Memcheck:Value8
+ fun:rpl_memchr
+}