From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#6378: all-completions Segfault Date: Tue, 08 Jun 2010 16:30:52 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276033088 12701 80.91.229.12 (8 Jun 2010 21:38:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 8 Jun 2010 21:38:08 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Lawrence Mitchell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 08 23:38:07 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 1OM6Uo-00053q-5v for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Jun 2010 23:38:06 +0200 Original-Received: from localhost ([127.0.0.1]:49083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OM6HM-0004M0-Ro for geb-bug-gnu-emacs@m.gmane.org; Tue, 08 Jun 2010 17:24:12 -0400 Original-Received: from [140.186.70.92] (port=49784 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OM61j-0004bd-D6 for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2010 17:08:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OM5s8-0001b7-Q3 for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2010 16:58:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45144) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OM5s8-0001b1-MA for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2010 16:58:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OM5Ss-0007Ux-MI; Tue, 08 Jun 2010 16:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Jun 2010 20:32: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.127602908728812 (code B ref -1); Tue, 08 Jun 2010 20:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Jun 2010 20:31:27 +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 1OM5SJ-0007Uf-A4 for submit@debbugs.gnu.org; Tue, 08 Jun 2010 16:31:27 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OM5S8-0007UW-Rd for submit@debbugs.gnu.org; Tue, 08 Jun 2010 16:31:26 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:45804) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OM5S2-0007Gw-6c for submit@debbugs.gnu.org; Tue, 08 Jun 2010 16:31:10 -0400 Original-Received: from [140.186.70.92] (port=54898 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OM5Rv-0001Hv-US for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2010 16:31:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OM5Ro-00050y-EA for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2010 16:30:57 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:51015) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OM5Ro-00050r-9x for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2010 16:30:56 -0400 Original-Received: from faina.iro.umontreal.ca (faina.iro.umontreal.ca [132.204.26.177]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id o58KUq5n007690; Tue, 8 Jun 2010 16:30:52 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 19A2970365; Tue, 8 Jun 2010 16:30:52 -0400 (EDT) In-Reply-To: (Lawrence Mitchell's message of "Tue, 08 Jun 2010 17:37:47 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3552=0 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: Tue, 08 Jun 2010 16:32: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:37614 Archived-At: > 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) Stefan