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 08:18:27 +0200 Organization: ThierryVolpiatto Message-ID: <87iq5sloek.fsf@tux.homenetwork> References: <874ohcbxfo.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1276067706 5353 80.91.229.12 (9 Jun 2010 07:15:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 9 Jun 2010 07:15:06 +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 09:15:02 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 1OMFV5-00040D-QD for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Jun 2010 09:15:00 +0200 Original-Received: from localhost ([127.0.0.1]:37596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMFC6-0007Cl-ET for geb-bug-gnu-emacs@m.gmane.org; Wed, 09 Jun 2010 02:55:22 -0400 Original-Received: from [140.186.70.92] (port=39364 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMF1w-0002HC-Cm for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 02:44:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMEm8-0008VU-LI for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 02:28:33 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35615) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMEm8-0008VQ-Ie for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 02:28:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OMEgo-00048m-FB; Wed, 09 Jun 2010 02:23: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 06:23: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.127606452615907 (code B ref -1); Wed, 09 Jun 2010 06:23:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jun 2010 06:22:06 +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 1OMEfu-00048W-Ab for submit@debbugs.gnu.org; Wed, 09 Jun 2010 02:22:06 -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 1OMEfr-000488-Hu for submit@debbugs.gnu.org; Wed, 09 Jun 2010 02:22:04 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:44709) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OMEfo-0006zn-7y for submit@debbugs.gnu.org; Wed, 09 Jun 2010 02:22:00 -0400 Original-Received: from [140.186.70.92] (port=58775 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OMEfm-0003AP-RE for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 02:21:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OMEfh-0007JF-Vj for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 02:21:58 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:33393) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OMEfh-0007J7-Lk for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 02:21:53 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OMEfe-0007u4-I5 for bug-gnu-emacs@gnu.org; Wed, 09 Jun 2010 08:21:50 +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 08:21:50 +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 08:21:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ connect(): No such file or directory Original-Lines: 63 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:tVFzhq8rfOaA4akPtm4gm4/UcAY= 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 02:23: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:37621 Archived-At: Thierry Volpiatto writes: > 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. Program received signal SIGSEGV, Segmentation fault. 0x08151015 in Fall_completions () -- Thierry Volpiatto Gpg key: http://pgp.mit.edu/