[Bug 231926] ldd can't operate on a segfaulting binary

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Oct 3 22:49:19 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231926

Mark Johnston <markj at FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj at FreeBSD.org

--- Comment #1 from Mark Johnston <markj at FreeBSD.org> ---
ldd is very simple: it sets some magic rtld flags and exec()s the specified
executable (or uses dlopen(RTLD_TRACE) for shared libs).  For an executable,
rtld will then print the dependencies and exit without actually calling into
the executable.  So a bug in the executable's code which causes a segfault
should not be triggered when run by ldd, but if the executable itself is
corrupted or invalid in some way, rtld may crash.  This may or may not be a bug
in rtld, depending on the nature of the corruption.

In other words, if the executable is segfaulting before main() gets invoked,
then the behaviour you're seeing is probably expected.  To say for sure, we
need to see exactly where the segfault is occurring.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list