From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 28 14:00:44 2012 Received: (at submit) by debbugs.gnu.org; 28 Jul 2012 18:00:44 +0000 Received: from localhost ([127.0.0.1]:46990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SvBJk-0000ob-BI for submit@debbugs.gnu.org; Sat, 28 Jul 2012 14:00:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58814) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SvBJi-0000oU-JL for submit@debbugs.gnu.org; Sat, 28 Jul 2012 14:00:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvBCr-0000qq-VQ for submit@debbugs.gnu.org; Sat, 28 Jul 2012 13:53:38 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37779) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvBCr-0000qm-SY for submit@debbugs.gnu.org; Sat, 28 Jul 2012 13:53:37 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvBCq-0006qU-Sm for bug-gnu-emacs@gnu.org; Sat, 28 Jul 2012 13:53:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvBCp-0000qQ-K1 for bug-gnu-emacs@gnu.org; Sat, 28 Jul 2012 13:53:36 -0400 Received: from defaultvalue.org ([70.85.129.156]:58782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvBCp-0000q7-Fb for bug-gnu-emacs@gnu.org; Sat, 28 Jul 2012 13:53:35 -0400 Received: from trouble.defaultvalue.org (localhost [127.0.0.1]) (Authenticated sender: rlb@defaultvalue.org) by defaultvalue.org (Postfix) with ESMTPSA id 4AAC090D35; Sat, 28 Jul 2012 12:56:22 -0500 (CDT) Received: by trouble.defaultvalue.org (Postfix, from userid 1000) id 22C5314E0C5; Sat, 28 Jul 2012 12:53:33 -0500 (CDT) From: Rob Browning To: bug-gnu-emacs@gnu.org Subject: Abort in replace-regexp with an after-change-functions hook References: <20120727200247.7276.54835.reportbug@susie.zeus.nullprogram.com> Date: Sat, 28 Jul 2012 12:53:33 -0500 In-Reply-To: <20120727200247.7276.54835.reportbug@susie.zeus.nullprogram.com> (Christopher Wellons's message of "Fri, 27 Jul 2012 16:02:47 -0400") Message-ID: <87wr1n22n6.fsf@trouble.defaultvalue.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit Cc: 682995-forwarded@bugs.debian.org, Christopher Wellons , 682995@bugs.debian.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) (If possible, please preserve the 682995-forwarded address in any replies.) The following bug report was recently filed, and I've tried the example, and saw the same abort. You can find additional information here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682995 Christopher Wellons writes: > Package: emacs24 > Version: 24.1+1-4 > Severity: normal > > When this expression is evaluated, Emacs will abort. > > (with-temp-buffer > (insert "#\n*\n") > (goto-char (point-min)) > (add-hook 'after-change-functions > (lambda (a b c) (re-search-forward "\n" nil t))) > (replace-regexp "^\\*" " *")) > > It is also provided in an attached file, example.el, in order to make > this easier to demonstrate. > > emacs -q -l example.el > > The abort() occurs in the check at the beginning of > buf_charpos_to_bytepos() in marker.c, because the point has left the > buffer bounds. I ran into this bug while trying to perform this > replace-regexp while in a third-party markdown-mode, and narrowed it > down to this combination of events. > > This bug also appears in emacs23 in both squeeze and sid as well as > upstream and non-Debian builds of Emacs. Thanks -- Rob Browning rlb @defaultvalue.org and @debian.org GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 19 12:09:45 2013 Received: (at 12077-done) by debbugs.gnu.org; 19 Feb 2013 17:09:45 +0000 Received: from localhost ([127.0.0.1]:37169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7qhN-00083U-0E for submit@debbugs.gnu.org; Tue, 19 Feb 2013 12:09:45 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:52205) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7qhL-00083O-B8 for 12077-done@debbugs.gnu.org; Tue, 19 Feb 2013 12:09:44 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1U7qgF-00048T-EF; Tue, 19 Feb 2013 12:08:35 -0500 From: Glenn Morris To: 12077-done@debbugs.gnu.org, Subject: Re: bug#12077: Abort in replace-regexp with an after-change-functions hook References: <20120727200247.7276.54835.reportbug@susie.zeus.nullprogram.com> <87wr1n22n6.fsf@trouble.defaultvalue.org> X-Spook: csystems rail gun InfoSec codes Ortega ASDIC Blowfish X-Ran: Cnt:fM4`W?RfKdnaB,|FNY~l\@ (Rob Browning's message of "Sat, 28 Jul 2012 12:53:33 -0500") Message-ID: <0cbobgut7x.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: 12077-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.5 (-------) Version: 24.4 Rob Browning wrote: >> When this expression is evaluated, Emacs will abort. >> >> (with-temp-buffer >> (insert "#\n*\n") >> (goto-char (point-min)) >> (add-hook 'after-change-functions >> (lambda (a b c) (re-search-forward "\n" nil t))) >> (replace-regexp "^\\*" " *")) By experiment, this issue is present in at least 22.3 through 24.2.93, but is fixed in the current trunk. From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 19 13:06:01 2013 Received: (at 12077) by debbugs.gnu.org; 19 Feb 2013 18:06:01 +0000 Received: from localhost ([127.0.0.1]:37288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7rZo-000154-2n for submit@debbugs.gnu.org; Tue, 19 Feb 2013 13:06:00 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:55781) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U7rZl-00014x-Ml for 12077@debbugs.gnu.org; Tue, 19 Feb 2013 13:05:58 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1U7rYg-0000QV-Et; Tue, 19 Feb 2013 13:04:50 -0500 From: Glenn Morris To: 12077@debbugs.gnu.org Subject: Re: bug#12077: Abort in replace-regexp with an after-change-functions hook References: <20120727200247.7276.54835.reportbug@susie.zeus.nullprogram.com> <87wr1n22n6.fsf@trouble.defaultvalue.org> <0cbobgut7x.fsf@fencepost.gnu.org> X-Spook: fraud enemy of the state monarchist Becker SCUD missile X-Ran: /'?0o>YUrw1tJ."*304l\3NS9(t<,!W>; (Glenn Morris's message of "Tue, 19 Feb 2013 12:08:34 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 12077 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.5 (-------) Glenn Morris wrote: >>> (with-temp-buffer >>> (insert "#\n*\n") >>> (goto-char (point-min)) >>> (add-hook 'after-change-functions >>> (lambda (a b c) (re-search-forward "\n" nil t))) >>> (replace-regexp "^\\*" " *")) > > By experiment, this issue is present in at least 22.3 through 24.2.93, > but is fixed in the current trunk. PS if someone feels like checking exactly what fixed this, then if it is a simple and obviously safe change, it could go in emacs-24. But since this is a long-standing issue, this is not essential. From unknown Mon Aug 18 00:03:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 20 Mar 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator