This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10411] New: Segfault with non-existent directory in LD_LIBRARY_PATH
- From: "azzie at astronet dot pl" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 17 Jul 2009 19:06:16 -0000
- Subject: [Bug libc/10411] New: Segfault with non-existent directory in LD_LIBRARY_PATH
- Reply-to: sourceware-bugzilla at sourceware dot org
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.