This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: [PATCH elfutils] [tests] parse inode in /proc/pid/maps/correctly in run-backtrace-data.sh
- From: Mark Wielaard <mark at klomp dot org>
- To: Yonghong Song <yhs at fb dot com>
- Cc: ast at fb dot com, elfutils-devel at sourceware dot org
- Date: Thu, 31 Jan 2019 22:21:00 +0100
- Subject: Re: [PATCH elfutils] [tests] parse inode in /proc/pid/maps/correctly in run-backtrace-data.sh
- References: <20190129213303.3364858-1-yhs@fb.com>
On Tue, Jan 29, 2019 at 01:33:03PM -0800, Yonghong Song wrote:
> The backtrace-data.c parsed the inode in /proc/pid/maps with
> format "%*x".
> This caused failure if inode is big. For example,
> 7f269223d000-7f269226b000 r-xp 00000000 00:50 10224326387095067468 /home/...
>
> The error likes below:
> -bash-4.4$ cat run-backtrace-data.sh.log
> backtrace-data: /home/engshare/elfutils/0.174/src/elfutils-0.174/tests/backtrace-data.c:110:
> maps_lookup: Assertion `errno == 0' failed.
> /home/engshare/elfutils/0.174/src/elfutils-0.174/tests/test-subr.sh: line 84:
> 3123578 Aborted (core dumped)
> LD_LIBRARY_PATH="${built_library_path}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" $VALGRIND_CMD "$@"
> data: no main
> -bash-4.4$
> The reason is errno is ERANGE.
>
> Fix the test with inode format string "%*u" as inode here is presented
> as decimal numbers.
Thanks. Added a ChangeLog entry and pushed to master.