From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.bugs Subject: bug#6378: all-completions Segfault Date: Wed, 09 Jun 2010 07:13:31 +0200 Organization: ThierryVolpiatto Message-ID: <874ohcbxfo.fsf@tux.homenetwork> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276061309 19244 80.91.229.12 (9 Jun 2010 05:28:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Jun 2010 05:28:29 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 09 07:28:29 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OMDpz-0007kv-GE for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Jun 2010 07:28:27 +0200 Original-Received: from localhost ([127.0.0.1]:55420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMDpy-0007Uw-UH for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Jun 2010 01:28:26 -0400 Original-Received: from [140.186.70.92] (port=59787 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMDpm-0007Tw-UQ for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 01:28:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMDph-00019E-T4 for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 01:28:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49089) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMDph-000197-OK for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 01:28:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OMDfu-0003iu-FK; Wed, 09 Jun 2010 01:18:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Thierry Volpiatto Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Jun 2010 05:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by submit@debbugs.gnu.org id=B.127606063414301 (code B ref -1); Wed, 09 Jun 2010 05:18:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jun 2010 05:17:14 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMDf8-0003ic-0y for submit@debbugs.gnu.org; Wed, 09 Jun 2010 01:17:14 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMDf5-0003iU-61 for submit@debbugs.gnu.org; Wed, 09 Jun 2010 01:17:12 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:48760) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OMDf1-0006Fg-2G for submit@debbugs.gnu.org; Wed, 09 Jun 2010 01:17:07 -0400 Original-Received: from [140.186.70.92] (port=49278 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMDeu-0003hv-LY for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 01:17:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMDeo-0008Ce-MO for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 01:17:00 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:47071) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMDeo-0008CT-C4 for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 01:16:54 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OMDen-0002Uc-1A for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 07:16:53 +0200 Original-Received: from 178.211.85-79.rev.gaoland.net ([79.85.211.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Jun 2010 07:16:53 +0200 Original-Received: from thierry.volpiatto by 178.211.85-79.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 09 Jun 2010 07:16:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 58 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 178.211.85-79.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Ca4niTW36Xqf0ZP5ULFxKWxnDeI= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 09 Jun 2010 01:18:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37620 Archived-At: Stefan Monnier writes: >> Although I don't understand why the code-path for the vector >> version can't be simplified as in the following patch, which also >> fixes the problem AFAICT: > >> diff --git a/src/minibuf.c b/src/minibuf.c >> index ad81bfd..c6aae27 100644 >> --- a/src/minibuf.c >> +++ b/src/minibuf.c >> @@ -1610,22 +1610,14 @@ with a space are ignored unless STRING itself starts with a space. */) >> } >> else if (type == 2) >> { >> - if (!EQ (bucket, zero)) >> - { >> - elt = bucket; >> - eltstring = elt; >> - if (XSYMBOL (bucket)->next) >> - XSETSYMBOL (bucket, XSYMBOL (bucket)->next); >> - else >> - XSETFASTINT (bucket, 0); >> - } >> - else if (++index >= obsize) >> - break; >> - else >> - { >> - bucket = XVECTOR (collection)->contents[index]; >> - continue; >> - } >> + if ( index < obsize ) >> + { >> + elt = bucket; >> + eltstring = elt; >> + bucket = XVECTOR (collection)->contents[++index]; >> + } >> + else >> + break; >> } >> else /* if (type == 3) */ >> { > > IIUC this would only loop through all the buckets, without looping > through each bucket's linked list. > Compare (length obarray) > and (let ((i 0)) (mapatoms (lambda (_) (incf i)) obarray) i) Don't know if that related but (completing-read "test: " [1 2 3 23 24 34 26 40 28]) test: 2 ==> TAB instead of failing crash emacs. -- Thierry Volpiatto Gpg key: http://pgp.mit.edu/