]> git.ipfire.org Git - thirdparty/valgrind.git/commit
coregrind/m_debuginfo: don't try to examine zero sized mmapped files
authorMark Wielaard <mark@klomp.org>
Sun, 9 Mar 2025 14:59:29 +0000 (15:59 +0100)
committerMark Wielaard <mark@klomp.org>
Sun, 9 Mar 2025 14:59:29 +0000 (15:59 +0100)
commit86ac4f2b004f57fa11224efafc1cd1c8fa8ded84
tree9ea7098cf9c6e69e2d06d3ac70f2ba5dea0b363f
parentdf5c62e04c26c328276e78fcb3923d5508fb70b8
coregrind/m_debuginfo: don't try to examine zero sized mmapped files

When run on an nfs filesystem memcheck/tests/pointer-trace fails
because it generates warnings "connection to image failed". This is
caused by trying to mmap a deleted file which the nfs file system
represents as a (hidden) regular file. This is normally not a problem
except when that file is empty.

Fix this by not trying to check whether a file is an ELF or MACHO
against an empty (regular) file in di_notify_mmap. An empty file is
never a valid ELF or MACHO file (and cannot be represented as
DiImage).

https://bugs.kde.org/show_bug.cgi?id=501119
NEWS
coregrind/m_debuginfo/debuginfo.c