From 9cf28e4f899f97ecdc983a0af8e2be62f3d69058 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 30 Sep 2008 06:35:35 +0000 Subject: libdwfl/ 2008-09-29 Roland McGrath * segment.c (insert): Must realloc DWFL->lookup_module here too. (dwfl_report_segment): Clear DWFL->lookup_module before insert calls. --- libdwfl/linux-proc-maps.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libdwfl/linux-proc-maps.c') diff --git a/libdwfl/linux-proc-maps.c b/libdwfl/linux-proc-maps.c index b4bb6cfc..2206f63c 100644 --- a/libdwfl/linux-proc-maps.c +++ b/libdwfl/linux-proc-maps.c @@ -267,6 +267,9 @@ read_proc_memory (void *arg, void *data, GElf_Addr address, { const int fd = *(const int *) arg; ssize_t nread = pread64 (fd, data, maxread, (off64_t) address); + /* Some kernels don't actually let us do this read, ignore those errors. */ + if (nread < 0 && (errno == EINVAL || errno == EPERM)) + return 0; if (nread > 0 && (size_t) nread < minread) nread = 0; return nread; -- cgit v1.2.3