From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: bug#7181: 24.0.50; args-out-of-range while reverting C++ header file Date: Sat, 9 Oct 2010 21:13:32 +0000 Message-ID: <20101009211332.GA5486@muc.de> References: <87zkuo2djr.fsf@telefonica.net> <83wrprn3ou.fsf@gnu.org> <87sk0f32pp.fsf@telefonica.net> <87ocb331wo.fsf@telefonica.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1286658052 24031 80.91.229.12 (9 Oct 2010 21:00:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Oct 2010 21:00:52 +0000 (UTC) Cc: 7181@debbugs.gnu.org, emacs-devel@gnu.org To: =?iso-8859-1?Q?=D3scar?= Fuentes Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 09 23:00:51 2010 Return-path: Envelope-to: ged-emacs-devel@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 1P4gXC-0000w5-P3 for ged-emacs-devel@m.gmane.org; Sat, 09 Oct 2010 23:00:51 +0200 Original-Received: from localhost ([127.0.0.1]:41885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4gXC-0003WP-60 for ged-emacs-devel@m.gmane.org; Sat, 09 Oct 2010 17:00:50 -0400 Original-Received: from [140.186.70.92] (port=47129 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4gX4-0003VU-OS for emacs-devel@gnu.org; Sat, 09 Oct 2010 17:00:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P4gX3-0000u2-Gj for emacs-devel@gnu.org; Sat, 09 Oct 2010 17:00:42 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:1288 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P4gX3-0000to-6U for emacs-devel@gnu.org; Sat, 09 Oct 2010 17:00:41 -0400 Original-Received: (qmail 14923 invoked by uid 3782); 9 Oct 2010 21:00:39 -0000 Original-Received: from acm.muc.de (pD9E51812.dip.t-dialin.net [217.229.24.18]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Sat, 09 Oct 2010 23:00:38 +0200 Original-Received: (qmail 5625 invoked by uid 1000); 9 Oct 2010 21:13:32 -0000 Content-Disposition: inline In-Reply-To: <87ocb331wo.fsf@telefonica.net> User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131540 Archived-At: Hi, Óscar, On Sat, Oct 09, 2010 at 03:56:39PM +0200, Óscar Fuentes wrote: > With the attached files the problem can be reproduced predictability: > > Save the attached files b.h.master and b.h.next to a directory and cd to > it. > > $ emacs -Q & > $ cp b.h.master b.h > C-x C-f b.h > $ cp b.h.next b.h > M-x revert-buffer > > and the args-out-of-range error pops: > > c-clear-char-property-with-value-function: Args out of range: 166, 453 > > I was unable to try with the latest Emacs sources because the build is > broken. My Emacs is from the 16 September. > Thanks for the recipe. I turned on debug-on-error and got this traceback: Debugger entered--Lisp error: (args-out-of-range 166 453) remove-text-properties(166 453 (category)) c-clear-char-property-with-value-function(1 453 category c-cpp-delimiter) c-neutralize-syntax-in-and-mark-CPP(94 94 286) c-after-change(94 94 286) <<====================================== insert-file-contents("/home/acm/b.h" t nil nil t) revert-buffer(t) call-interactively(revert-buffer nil nil) c-after-change is on the after-change-functions hook. The values of BEG END OLD-LEN it is being passed look utterly wrong. BEG and END should delimit the entire buffer and OLD-LEN should be the length of the previous buffer. Surely? -- Alan Mackenzie (Nuremberg, Germany).