This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/21501] get-dynamic-info assertion incorrectly triggered for i686 on x86_64 : 'Assertion `info[DT_RPATH] == NULL' failed!'
- From: "jason.vas.dias at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 18 May 2017 15:01:54 +0000
- Subject: [Bug nptl/21501] get-dynamic-info assertion incorrectly triggered for i686 on x86_64 : 'Assertion `info[DT_RPATH] == NULL' failed!'
- Auto-submitted: auto-generated
- References: <bug-21501-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21501
--- Comment #9 from Jason Vas Dias <jason.vas.dias at gmail dot com> ---
Ok, so that was the wrong patch - problem still happens, because
the DT_RPATH element of 'info' is actually set to an Elf32_Dyn
symbol containing NO data :
$ gdb --args ./ld.so --list /tmp/hello32
...
(gdb) b /usr/os_src/glibc/elf/get-dynamic-info.h:142
Breakpoint 1 at 0x4f48: file get-dynamic-info.h, line 142.
(gdb) run
Starting program: /usr/build/linux/glibc-x86/elf/ld.so --list /tmp/hello32
Breakpoint 1, elf_get_dynamic_info (temp=0x0, l=0x56579538 <_rtld_local+1304>)
at get-dynamic-info.h:148
148 assert (info[DT_RUNPATH] == NULL);
(gdb) p info
$1 = (Elf32_Dyn **) 0x56579558 <_rtld_local+1336>
(gdb) p *info
$2 = (Elf32_Dyn *) 0x0
(gdb) p info[DT_RUNPATH]
No symbol "DT_RUNPATH" in current context.
...
( so then I lookup DT_RPATH & DT_RUNPATH in /usr/include/elf.h :
..
(gdb) p info[15]
$3 = (Elf32_Dyn *) 0x56578f3c
(gdb) p *info[15]
$4 = {d_tag = 15, d_un = {d_val = 0, d_ptr = 0}}
(gdb) p *info[29]
Cannot access memory at address 0x0
So there actually is an EMPTY element (d_val == 0) there.
And nothing on any gcc or ld command line seems to explain this.
I'll change the patch to explicitly test if
info[DT_RPATH].d_val == 0
.
--
You are receiving this mail because:
You are on the CC list for the bug.