]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdwfl: parse inode in /proc/pid/maps correctly
authorYonghong Song <yhs@fb.com>
Fri, 25 Jan 2019 21:20:08 +0000 (13:20 -0800)
committerMark Wielaard <mark@klomp.org>
Tue, 29 Jan 2019 20:07:51 +0000 (21:07 +0100)
commit14ec4824632be7a35afb422f8205773a2bd579d8
tree11c29b77532345cde0da571eb9434188e7f33321
parentb548f4fe92c43e117cac395a8d23cb9c1fab02af
libdwfl: parse inode in /proc/pid/maps correctly

The inode number in /proc/pid/maps is displayed as "unsigned long"
type.

In one of our x64 system, we have inode number exceeding valid "long"
type range, which caused the following test failure:
   FAIL: dwfl-bug-fd-leak
   FAIL: run-backtrace-dwarf.sh
   FAIL: vdsosyms

The offending map entry:
  7f269246b000-7f269246c000 rw-p 0002e000 00:50 10224326387095067468 /home/...

This patch changed sscanf inode number type from PRIi64 to PRIu64
and fixed the problem.

Signed-off-by: Yonghong Song <yhs@fb.com>
libdwfl/ChangeLog
libdwfl/linux-proc-maps.c