From: Jeffrey Walton <noloader@gmail.com>
To: gdb@sourceware.org
Subject: GDB loading incorrect version library
Date: Fri, 15 Jan 2021 02:30:11 -0500 [thread overview]
Message-ID: <CAH8yC8=CsmjO_VsMbxiK0RA-oAefoWmCYE=LDwhHvQec3B8saQ@mail.gmail.com> (raw)
Hi Everyone,
I'm trying to investigate a Bash crash when Bash is instrumented with
Asan. I've got Bash and all of its dependencies built/installed at
~/ok2delete-asan. All of them are built with Asan.
GDB startup shows:
$ gdb ~/ok2delete-asan/bin/bash
gdb: /usr/local/lib/libncursesw.so.6: no version information
available (required by gdb)
It appears GDB is not loading the proper version of Ncurses:
(gdb) shell readelf -d ~/ok2delete-asan/bin/bash | grep -E 'RPATH|RUNPATH'
0x000000000000001d (RUNPATH) Library runpath:
[$ORIGIN/../lib:/home/jwalton/ok2delete-asan/lib]
And (slightly trimmed):
(gdb) shell ldd ~/ok2delete-asan/bin/bash
linux-vdso.so.1 (0x00007ffde6bfc000)
libasan.so.5 => /usr/lib/x86_64-linux-gnu/libasan.so.5
libiconv.so.2 => /home/jwalton/ok2delete-asan/bin/../lib/libiconv.so.2
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2
libtinfow.so.6 => /home/jwalton/ok2delete-asan/bin/../lib/libtinfow.so.6
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
/lib64/ld-linux-x86-64.so.2
All of the warez built use the same RUNPATH.
How do I tell GDB to use the RUNPATH set in the binary?
Thanks in advance.
next reply other threads:[~2021-01-15 7:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-15 7:30 Jeffrey Walton [this message]
2021-01-15 16:15 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH8yC8=CsmjO_VsMbxiK0RA-oAefoWmCYE=LDwhHvQec3B8saQ@mail.gmail.com' \
--to=noloader@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).