public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/10411] New: Segfault with non-existent directory in LD_LIBRARY_PATH
@ 2009-07-17 19:06 azzie at astronet dot pl
  2009-08-01  3:52 ` [Bug libc/10411] " drepper at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: azzie at astronet dot pl @ 2009-07-17 19:06 UTC (permalink / raw)
  To: glibc-bugs

By mistake I put a non-existent path in my LD_LIBRARY_PATH. To my surprise
display (ImageMagick program) crashed with segmentation fault after the change.
Debugging with valgrind and gdb leads to elf/dl-load.c:1943 in open_path() which
contains the following line:

sps->dirs = (void *) -1;

Can sps->dirs be changed when it comes from the environment? For the segfault
the open_path() is invoked as follows:

fd = open_path (name, namelen, preloaded, &env_path_list,
                &realname, &fb,
                loader ?: GL(dl_ns)[LM_ID_BASE]._ns_loaded,
                LA_SER_LIBPATH, &found_other_class);

Backtrace:

==24674==  Bad permissions for mapped region at address 0x421CDF0
==24674==    at 0x4005E52: open_path (dl-load.c:1943)
==24674==    by 0x4007B00: _dl_map_object (dl-load.c:2079)
==24674==    by 0x4011950: dl_open_worker (dl-open.c:289)
==24674==    by 0x400D3D5: _dl_catch_error (dl-error.c:178)
==24674==    by 0x40112EA: _dl_open (dl-open.c:616)
==24674==    by 0x7A45F7A: dlopen_doit (dlopen.c:67)
==24674==    by 0x400D3D5: _dl_catch_error (dl-error.c:178)
==24674==    by 0x7A4632B: _dlerror_run (dlerror.c:164)
==24674==    by 0x7A45EE0: dlopen@@GLIBC_2.2.5 (dlopen.c:88)
==24674==    by 0x4FAF559: vm_open (dlopen.c:194)
==24674==    by 0x4FAD376: tryall_dlopen (ltdl.c:434)
==24674==    by 0x4FADE43: try_dlopen (ltdl.c:532)

-- 
           Summary: Segfault with non-existent directory in LD_LIBRARY_PATH
           Product: glibc
           Version: 2.10
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: azzie at astronet dot pl
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10411

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-11-02 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-17 19:06 [Bug libc/10411] New: Segfault with non-existent directory in LD_LIBRARY_PATH azzie at astronet dot pl
2009-08-01  3:52 ` [Bug libc/10411] " drepper at redhat dot com
2009-10-30  5:51 ` drepper at redhat dot com
2009-11-02 18:12 ` azzie at astronet dot pl
2009-11-02 18:22 ` azzie at astronet dot pl

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).