xref: /netbsd-src/external/gpl3/gdb/dist/gnulib/import/memchr.valgrind (revision 4b169a6ba595ae283ca507b26b15fdff40495b1c)
18dffb485Schristos# Suppress a valgrind message about use of uninitialized memory in memchr().
28dffb485Schristos
3*4b169a6bSchristos# Copyright (C) 2009-2022 Free Software Foundation, Inc.
48dffb485Schristos#
5*4b169a6bSchristos# This file is free software: you can redistribute it and/or modify
6*4b169a6bSchristos# it under the terms of the GNU Lesser General Public License as
7*4b169a6bSchristos# published by the Free Software Foundation; either version 2.1 of the
8*4b169a6bSchristos# License, or (at your option) any later version.
98dffb485Schristos#
10*4b169a6bSchristos# This file is distributed in the hope that it will be useful,
118dffb485Schristos# but WITHOUT ANY WARRANTY; without even the implied warranty of
128dffb485Schristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*4b169a6bSchristos# GNU Lesser General Public License for more details.
148dffb485Schristos#
15*4b169a6bSchristos# You should have received a copy of the GNU Lesser General Public License
168dffb485Schristos# along with this program.  If not, see <https://www.gnu.org/licenses/>.
178dffb485Schristos
188dffb485Schristos# POSIX states that when the character is found, memchr must not read extra
198dffb485Schristos# bytes in an overestimated length (for example, where memchr is used to
208dffb485Schristos# implement strnlen).  However, we use a safe word read to provide a speedup.
218dffb485Schristos{
228dffb485Schristos    memchr-value4
238dffb485Schristos    Memcheck:Value4
248dffb485Schristos    fun:rpl_memchr
258dffb485Schristos}
268dffb485Schristos{
278dffb485Schristos    memchr-value8
288dffb485Schristos    Memcheck:Value8
298dffb485Schristos    fun:rpl_memchr
308dffb485Schristos}
31