From owner-freebsd-current@FreeBSD.ORG Wed Dec 1 14:40:30 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC2B716A4CE for ; Wed, 1 Dec 2004 14:40:30 +0000 (GMT) Received: from smtp.ruby.ocn.ne.jp (ruby.ocn.ne.jp [222.146.40.76]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F85943D4C for ; Wed, 1 Dec 2004 14:40:30 +0000 (GMT) (envelope-from toshi@ruby.ocn.ne.jp) Received: from localhost (p6194-ipadfx01sizuokaden.shizuoka.ocn.ne.jp [219.160.179.194]) by smtp.ruby.ocn.ne.jp (Postfix) with ESMTP id D0E814C2F; Wed, 1 Dec 2004 23:40:28 +0900 (JST) Date: Wed, 01 Dec 2004 23:40:07 +0900 (JST) Message-Id: <20041201.234007.226808332.toshi@ruby.ocn.ne.jp> To: current@freebsd.org From: SAITOU Toshihide In-Reply-To: <20041130081804.GA22353@xs4all.nl> References: <20041130081804.GA22353@xs4all.nl> X-GPG-fingerprint: 34B3 0B6A 8520 F5B0 EBC7 69F6 C055 9F8A 0D49 F8FC X-Mailer: Mew version 4.1.50 on Emacs 21.3.50 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 02 Dec 2004 13:22:17 +0000 Subject: Re: bash/readline coredumps X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2004 14:40:30 -0000 From: Michiel Boland Date: Tue, 30 Nov 2004 09:18:04 +0100 > Lately I am getting core dumps from bash (bash-2.05b.007_2 from ports). > To reproduce: type a command that spans multiple lines, like I couldn't reproduce a core dump by your instruction, but I had possibly experienced a similar/related bash core dump since around 5.3-RELEASE. $ ./bash $ /bin/ls -ld /var/db/pkg/v* Segmentation fault (core dumped) $ gdb ./bash bash.core #0 0x48213499 in memcpy () from /lib/libc.so.5 (gdb) bt #0 0x48213499 in memcpy () from /lib/libc.so.5 #1 0x080ba348 in xmbsrtowcs (dest=0x1d, src=0xbfbfe804, len=0, pstate=0xbfbfe760) at xmbsrtowcs.c:67 #2 0x080ba123 in xstrmatch (pattern=0x0, string=0x8104fe4 "cyrus-sasl-saslauthd-2.1.19", flags=5) at smatch.c:388 #3 0x080b6bcd in glob_vector (pat=0x810182c "v*", dir=0xbfbfe8e0 "/var/db/pkg/", flags=0) at glob.c:491 #4 0x080b7275 in glob_filename (pathname=0x8101820 "/var/db/pkg/v*", flags=0) at glob.c:768 #5 0x0807ff07 in shell_glob_filename (pathname=0x8101850 "/var/db/pkg/v*") at pathexp.c:254 #6 0x0807d10d in expand_word_list_internal (list=0x80ef3c0, eflags=31) at subst.c:6406 #7 0x08066d4b in execute_command_internal (command=0x0, asynchronous=0, pipe_in=-1, pipe_out=-1, fds_to_close=0x81017f0) at execute_cmd.c:2554 #8 0x08068b35 in execute_command (command=0x80ef300) at execute_cmd.c:324 #9 0x0805bb19 in reader_loop () at eval.c:143 #10 0x0805aad1 in main (argc=1, argv=0xbfbfed40, env=0xbfbfed48) at shell.c:680 (gdb) up #1 0x080ba348 in xmbsrtowcs (dest=0x1d, src=0xbfbfe804, len=0, pstate=0xbfbfe760) at xmbsrtowcs.c:67 67 memcpy(mbsbuf, *src, n + 1); (gdb) print mbsbuf $1 = 0x80ef3c0 "cyrus-sasl-saslauthd-2.1.19" (gdb) print src $2 = (const char **) 0xbfbfe804 #6 0x0807d10d in expand_word_list_internal (list=0x80ef3c0, eflags=31) at subst.c:6406 #7 0x08066d4b in execute_command_internal (command=0x0, asynchronous=0, pipe_in=-1, pipe_out=-1, fds_to_close=0x81017f0) at execute_cmd.c:2554 #8 0x08068b35 in execute_command (command=0x80ef300) at execute_cmd.c:324 #9 0x0805bb19 in reader_loop () at eval.c:143 #10 0x0805aad1 in main (argc=1, argv=0xbfbfed40, env=0xbfbfed48) at shell.c:680 (gdb) up #1 0x080ba348 in xmbsrtowcs (dest=0x1d, src=0xbfbfe804, len=0, pstate=0xbfbfe760) at xmbsrtowcs.c:67 67 memcpy(mbsbuf, *src, n + 1); (gdb) print mbsbuf $1 = 0x80ef3c0 "cyrus-sasl-saslauthd-2.1.19" (gdb) print src $2 = (const char **) 0xbfbfe804 (gdb) print *src $3 = 0x8104fe4 "cyrus-sasl-saslauthd-2.1.19" (gdb) print n $4 = 135286784 I finally migrate to bash3 (ports/shells/bash) and it seems ceased/lessened. SAITOU Toshihide