On Fri, Nov 08, 2013 at 07:27:17PM +0100, Mark Wielaard wrote:
On Fri, Nov 08, 2013 at 05:50:31PM +0100, Jan Kratochvil wrote:
> On Fri, 08 Nov 2013 17:21:02 +0100, Mark Wielaard wrote:
> > Or by hand:
> >
LD_LIBRARY_PATH=~/build/elfutils-obj/backends:~/build/elfutils-obj/libelf:~/build/elfutils-obj/libdw
valgrind --run-libc-freeres=no src/addr2line -S -e test-core.exec --core=test-core.core
0x7f67f2aaf619
>
> For the master commit (=with unwinder) I really get:
>
> valgrind: m_redir.c:700 (vgPlain_redir_add_ifunc_target): Assertion 'old'
failed.
> ==9785== at 0x38059B6F: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux)
> ==9785== by 0x38059CB2: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux)
> ==9785== by 0x3806A40D: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux)
> ==9785== by 0x3809F787: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux)
> ==9785== by 0x380AE0FC: ??? (in /usr/lib64/valgrind/memcheck-amd64-linux)
>
> sched status:
> running_tid=1
>
> Thread 1: status = VgTs_Runnable
> ==9785== at 0x4A237CC: _vgnU_ifunc_wrapper (in
/usr/lib64/valgrind/vgpreload_core-amd64-linux.so)
> ==9785== by 0x400E99E: _dl_fixup (dl-irel.h:32)
> ==9785== by 0x40152A4: _dl_runtime_resolve (dl-trampoline.S:45)
> ==9785== by 0xC3ABCF9: x86_64_core_note (linux-core-note.c:210)
> ==9785== by 0x4E743C3: ebl_core_note (eblcorenote.c:54)
> ==9785== by 0x4E6EE16: __libdwfl_attach_state_for_core (linux-core-attach.c:333)
> ==9785== by 0x4E6AE52: dwfl_core_file_report@(a)ELFUTILS_0.158 (core-file.c:565)
> ==9785== by 0x4E5CF8B: parse_opt (argp-std.c:317)
> ==9785== by 0x53A6927: ??? (in /usr/lib64/libc-2.17.so)
> ==9785== by 0x401BDA: main (addr2line.c:149)
Yeah, so that really seems to be a bug in valgrind.
It is indeed a real bug in valgrind, triggered by the somewhat unusual
case that we read/mmap glibc again when inspecting the ELF file. I don't
have a real fix for it yet, but there is a workaround for valgrind in
this bug report:
https://bugs.kde.org/show_bug.cgi?id=327427
Cheers,
Mark