From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18102 invoked by alias); 17 Jul 2009 19:06:29 -0000 Received: (qmail 18065 invoked by uid 48); 17 Jul 2009 19:06:16 -0000 Date: Fri, 17 Jul 2009 19:06:00 -0000 From: "azzie at astronet dot pl" To: glibc-bugs@sources.redhat.com Message-ID: <20090717190615.10411.azzie@astronet.pl> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug libc/10411] New: Segfault with non-existent directory in LD_LIBRARY_PATH X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00053.txt.bz2 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.