From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 04 18:37:47 2017 Received: (at submit) by debbugs.gnu.org; 4 Jan 2017 23:37:47 +0000 Received: from localhost ([127.0.0.1]:41578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOv7q-0005Ye-V5 for submit@debbugs.gnu.org; Wed, 04 Jan 2017 18:37:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOv7p-0005YS-Q4 for submit@debbugs.gnu.org; Wed, 04 Jan 2017 18:37:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOv7j-0007n3-I7 for submit@debbugs.gnu.org; Wed, 04 Jan 2017 18:37:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55625) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOv7j-0007mx-FB for submit@debbugs.gnu.org; Wed, 04 Jan 2017 18:37:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOv7i-0005CH-7f for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 18:37:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOv7d-0007lY-CK for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 18:37:38 -0500 Received: from smtp.jpl.nasa.gov ([128.149.139.109]:45161 helo=mail.jpl.nasa.gov) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOv7d-0007l2-36 for bug-gnu-emacs@gnu.org; Wed, 04 Jan 2017 18:37:33 -0500 Received: from fatty.jpl.nasa.gov (fatty.jpl.nasa.gov [128.149.110.210]) (authenticated (0 bits)) by smtp.jpl.nasa.gov (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id v04NbP1X000790 (using TLSv1 with cipher AES256-SHA (256 bits) verified NO) for ; Wed, 4 Jan 2017 15:37:26 -0800 Received: by fatty.jpl.nasa.gov (sSMTP sendmail emulation); Wed, 04 Jan 2017 15:37:25 -0800 From: Dima Kogan To: bug-gnu-emacs@gnu.org Subject: 26.0.50; comment-region goes into an infinite loop Date: Wed, 04 Jan 2017 15:37:25 -0800 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Source-Sender: dima@secretsauce.net X-AUTH: Authorized X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain Hi. I'm using a very recent emacs built from master: eb3416016b4 I'm observing (comment-region) go into an infinite loop when presented with particular data. I'm attaching a small source file that demonstrates the issue. To see it break, run this: emacs --eval '(add-hook (quote c-mode-common-hook) (lambda () (setq comment-start "//" comment-end "")))' \ --eval '(global-set-key (kbd "") (lambda () (interactive) (comment-region 16 45)))' \ -Q tst6.c This loads the demo file with a clean configuration, and runs two bits of lisp: 1. Sets up a c++ commenting style. This is required for the issue to present itself 2. Binds f5 to run the problematic (comment-region) On my machine, invoking emacs that way, and then hitting f5 shows the problem. --=-=-= Content-Type: text/x-csrc Content-Disposition: inline; filename=tst6.c void f(void) { g( // output s ); } --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 05 15:55:10 2017 Received: (at 25362) by debbugs.gnu.org; 5 Jan 2017 20:55:10 +0000 Received: from localhost ([127.0.0.1]:44059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPF42-0008Op-GF for submit@debbugs.gnu.org; Thu, 05 Jan 2017 15:55:10 -0500 Received: from ocolin.muc.de ([193.149.48.4]:13913 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPF40-0008Og-HV for 25362@debbugs.gnu.org; Thu, 05 Jan 2017 15:55:09 -0500 Received: (qmail 85749 invoked by uid 3782); 5 Jan 2017 20:55:06 -0000 Received: from acm.muc.de (p548C6DF0.dip0.t-ipconnect.de [84.140.109.240]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 05 Jan 2017 21:55:05 +0100 Received: (qmail 1095 invoked by uid 1000); 5 Jan 2017 20:54:52 -0000 Date: Thu, 5 Jan 2017 20:54:52 +0000 To: Dima Kogan Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop Message-ID: <20170105205452.GA808@acm.fritz.box> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25362 Cc: 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Hello, Dima. On Wed, Jan 04, 2017 at 03:37:25PM -0800, Dima Kogan wrote: > Hi. I'm using a very recent emacs built from master: > eb3416016b4 > I'm observing (comment-region) go into an infinite loop when presented > with particular data. I'm attaching a small source file that > demonstrates the issue. To see it break, run this: > emacs --eval '(add-hook (quote c-mode-common-hook) (lambda () (setq comment-start "//" comment-end "")))' \ > --eval '(global-set-key (kbd "") (lambda () (interactive) (comment-region 16 45)))' \ > -Q tst6.c > This loads the demo file with a clean configuration, and runs two bits > of lisp: > 1. Sets up a c++ commenting style. This is required for the issue to > present itself > 2. Binds f5 to run the problematic (comment-region) > On my machine, invoking emacs that way, and then hitting f5 shows the problem. Just as an aside, this bug happens even in Emacs 25.1 without any of the settings you call it with. Just visit the file, mark that region and do C-c C-c. The hang happens in comment-region-internal on attempting to insert "// " to the first non-empty line in the range. Something funny is happening in a before/after-change-function or a font-lock function in CC Mode. I'll be looking into it. Thanks. > void f(void) > { > > g( // output > s ); > > } -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 02:41:18 2017 Received: (at 25362) by debbugs.gnu.org; 6 Jan 2017 07:41:19 +0000 Received: from localhost ([127.0.0.1]:44393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPP9K-0007BR-OO for submit@debbugs.gnu.org; Fri, 06 Jan 2017 02:41:18 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPP9J-0007BE-42 for 25362@debbugs.gnu.org; Fri, 06 Jan 2017 02:41:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPP9A-000446-Pr for 25362@debbugs.gnu.org; Fri, 06 Jan 2017 02:41:11 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPP9A-000442-MX; Fri, 06 Jan 2017 02:41:08 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4170 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cPP99-0006in-Pa; Fri, 06 Jan 2017 02:41:08 -0500 Date: Fri, 06 Jan 2017 09:41:26 +0200 Message-Id: <83tw9cd49l.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20170105205452.GA808@acm.fritz.box> (message from Alan Mackenzie on Thu, 5 Jan 2017 20:54:52 +0000) Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop References: <20170105205452.GA808@acm.fritz.box> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-Debbugs-Envelope-To: 25362 Cc: dima@secretsauce.net, 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) > Date: Thu, 5 Jan 2017 20:54:52 +0000 > From: Alan Mackenzie > Cc: 25362@debbugs.gnu.org > > Just as an aside, this bug happens even in Emacs 25.1 without any of the > settings you call it with. Just visit the file, mark that region and do > C-c C-c. Is this bug new in Emacs 25.1? From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 04:32:55 2017 Received: (at 25362) by debbugs.gnu.org; 6 Jan 2017 09:32:55 +0000 Received: from localhost ([127.0.0.1]:44460 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPQtL-0001Uy-Fe for submit@debbugs.gnu.org; Fri, 06 Jan 2017 04:32:55 -0500 Received: from ocolin.muc.de ([193.149.48.4]:32980 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPQtJ-0001Up-Kq for 25362@debbugs.gnu.org; Fri, 06 Jan 2017 04:32:54 -0500 Received: (qmail 56962 invoked by uid 3782); 6 Jan 2017 09:32:52 -0000 Received: from acm.muc.de (p548C6D19.dip0.t-ipconnect.de [84.140.109.25]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 06 Jan 2017 10:32:51 +0100 Received: (qmail 2156 invoked by uid 1000); 6 Jan 2017 09:32:37 -0000 Date: Fri, 6 Jan 2017 09:32:37 +0000 To: Eli Zaretskii Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop Message-ID: <20170106093237.GA2118@acm.fritz.box> References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83tw9cd49l.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25362 Cc: dima@secretsauce.net, 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Good morning, Eli. On Fri, Jan 06, 2017 at 09:41:26AM +0200, Eli Zaretskii wrote: > > Date: Thu, 5 Jan 2017 20:54:52 +0000 > > From: Alan Mackenzie > > Cc: 25362@debbugs.gnu.org > > Just as an aside, this bug happens even in Emacs 25.1 without any of the > > settings you call it with. Just visit the file, mark that region and do > > C-c C-c. > Is this bug new in Emacs 25.1? Yes, it is. I've just tried the scenario out on Emacs 24.5, and it works OK there. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 04:37:06 2017 Received: (at 25362) by debbugs.gnu.org; 6 Jan 2017 09:37:06 +0000 Received: from localhost ([127.0.0.1]:44464 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPQxO-0001b3-0A for submit@debbugs.gnu.org; Fri, 06 Jan 2017 04:37:06 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37544) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPQxL-0001aZ-Mn for 25362@debbugs.gnu.org; Fri, 06 Jan 2017 04:37:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPQxD-0007xU-FR for 25362@debbugs.gnu.org; Fri, 06 Jan 2017 04:36:58 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPQxD-0007xQ-Cf; Fri, 06 Jan 2017 04:36:55 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4274 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cPQxC-0005Qv-Ga; Fri, 06 Jan 2017 04:36:54 -0500 Date: Fri, 06 Jan 2017 11:37:12 +0200 Message-Id: <83h95ccywn.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20170106093237.GA2118@acm.fritz.box> (message from Alan Mackenzie on Fri, 6 Jan 2017 09:32:37 +0000) Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-Debbugs-Envelope-To: 25362 Cc: dima@secretsauce.net, 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) > Date: Fri, 6 Jan 2017 09:32:37 +0000 > Cc: dima@secretsauce.net, 25362@debbugs.gnu.org > From: Alan Mackenzie > > > Is this bug new in Emacs 25.1? > > Yes, it is. I've just tried the scenario out on Emacs 24.5, and it > works OK there. Then it would be good to have a safe enough solution that we could install on the release branch, or, failing that, a safe workaround. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 06 04:42:05 2017 Received: (at 25362) by debbugs.gnu.org; 6 Jan 2017 09:42:06 +0000 Received: from localhost ([127.0.0.1]:44468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPR2D-0001ia-Nv for submit@debbugs.gnu.org; Fri, 06 Jan 2017 04:42:05 -0500 Received: from ocolin.muc.de ([193.149.48.4]:55589 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPR2B-0001iR-VW for 25362@debbugs.gnu.org; Fri, 06 Jan 2017 04:42:04 -0500 Received: (qmail 58611 invoked by uid 3782); 6 Jan 2017 09:42:03 -0000 Received: from acm.muc.de (p548C6D19.dip0.t-ipconnect.de [84.140.109.25]) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 06 Jan 2017 10:42:02 +0100 Received: (qmail 3266 invoked by uid 1000); 6 Jan 2017 09:41:49 -0000 Date: Fri, 6 Jan 2017 09:41:48 +0000 To: Eli Zaretskii Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop Message-ID: <20170106094148.GB2118@acm.fritz.box> References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83h95ccywn.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25362 Cc: dima@secretsauce.net, 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Hello again, Eli. On Fri, Jan 06, 2017 at 11:37:12AM +0200, Eli Zaretskii wrote: > > Date: Fri, 6 Jan 2017 09:32:37 +0000 > > Cc: dima@secretsauce.net, 25362@debbugs.gnu.org > > From: Alan Mackenzie > > > Is this bug new in Emacs 25.1? > > Yes, it is. I've just tried the scenario out on Emacs 24.5, and it > > works OK there. > Then it would be good to have a safe enough solution that we could > install on the release branch, or, failing that, a safe workaround. I'm working on it at the moment. It's a bit of a tricky one, because the cause is triggering during both command processing and redisplay. But I hope to be in touch again soon with a fix. > Thanks. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 01:41:49 2017 Received: (at control) by debbugs.gnu.org; 7 Jan 2017 06:41:49 +0000 Received: from localhost ([127.0.0.1]:45527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPkhI-00040S-Re for submit@debbugs.gnu.org; Sat, 07 Jan 2017 01:41:49 -0500 Received: from mail-io0-f194.google.com ([209.85.223.194]:35189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPkhG-00040F-QW for control@debbugs.gnu.org; Sat, 07 Jan 2017 01:41:47 -0500 Received: by mail-io0-f194.google.com with SMTP id m98so2017332iod.2 for ; Fri, 06 Jan 2017 22:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=rwqPhKrW8wzQYhDAafjc5QW65HJqqWNof5/Y7R0TC6s=; b=YqL0/VAoGIl4bLXZGXhN1WU5ONzoSuJ3zUWP+trFDDJXlQFjOBvFHe0jeEr3VzGMWh XVg/ulAoKXq43fMtxNOhZycwrCAgCxr9fc05Y5PA59ir0qczUvd1uO+YGnMCVWXOduJn 6UlkhAESZWAuhqZXAHATUmLnRO8usY+8nu4OuvE6sXUhrNuGc3IfyauGzd7lXOtMT3Yw 1xtD0hjq7z5fpYOWsNozyE8LWx6lTVGI1D7/BvScmMlzCzDqPCwTNL3mAE1w4uHf6twS gSWyrVJnGQWBhbKwcS23ddZJQwALuORmCE50SuS0/mZOioTg6FHhhILba1vO1UUo2C/Y 2ymw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=rwqPhKrW8wzQYhDAafjc5QW65HJqqWNof5/Y7R0TC6s=; b=s6eB4T7NsMWX61XCMmjvXFurOz+yXN0A9LGVBzghiWjVYLSgMRKg2lqOBGclEiXZ2p HeT/Sq5GmPmUbkugZiJvmntvDCE57dsP1wB2I++QbvI3L/yh17WFczQOq+3AIEV0ePjM CR0xjq/S013CE83ofBDMND+lQk2WkYRX80O7kyo8aAcR7groz5aEW9aYM5i6QvPWyAof VlfqEuL16rWRg0N55ihcCKoSdvYA/5byfwhl2nCz+P6kYJlle/ENLfMcyOWQBgyTdcMf pz4KFOpYa7yyeRyQueXuRnEVYfdA3dHSPHrITf16a2inbdTrHiafELY+yY/RVhc9SH5p 0E+A== X-Gm-Message-State: AIkVDXKfHqj3fzrCeXVYubvzNxUPo5hhhrofIMfoTLpiTqGdMRHREj4IXPN5heZU23aBFw== X-Received: by 10.107.7.168 with SMTP id g40mr9061147ioi.92.1483771301009; Fri, 06 Jan 2017 22:41:41 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id w192sm2778686itw.3.2017.01.06.22.41.40 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Jan 2017 22:41:40 -0800 (PST) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> Date: Sat, 07 Jan 2017 01:42:43 -0500 In-Reply-To: <20170106093237.GA2118@acm.fritz.box> (Alan Mackenzie's message of "Fri, 6 Jan 2017 09:32:37 +0000") Message-ID: <87vatr2wws.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) tags 25362 confirmed found 25362 25.1 quit Alan Mackenzie writes: > Good morning, Eli. > > On Fri, Jan 06, 2017 at 09:41:26AM +0200, Eli Zaretskii wrote: >> > Date: Thu, 5 Jan 2017 20:54:52 +0000 >> > From: Alan Mackenzie >> > Cc: 25362@debbugs.gnu.org > >> > Just as an aside, this bug happens even in Emacs 25.1 without any of the >> > settings you call it with. Just visit the file, mark that region and do >> > C-c C-c. > >> Is this bug new in Emacs 25.1? > > Yes, it is. I've just tried the scenario out on Emacs 24.5, and it > works OK there. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 03:20:42 2017 Received: (at 25362) by debbugs.gnu.org; 7 Jan 2017 08:20:42 +0000 Received: from localhost ([127.0.0.1]:45552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPmF0-0007yf-9N for submit@debbugs.gnu.org; Sat, 07 Jan 2017 03:20:42 -0500 Received: from ocolin.muc.de ([193.149.48.4]:37512 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPmEy-0007yX-8G for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 03:20:40 -0500 Received: (qmail 57131 invoked by uid 3782); 7 Jan 2017 08:20:39 -0000 Received: from acm.muc.de (p548C75D0.dip0.t-ipconnect.de [84.140.117.208]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 07 Jan 2017 09:20:38 +0100 Received: (qmail 3567 invoked by uid 1000); 7 Jan 2017 08:20:23 -0000 Date: Sat, 7 Jan 2017 08:20:23 +0000 To: Eli Zaretskii Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop Message-ID: <20170107082023.GA3499@acm.fritz.box> References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83h95ccywn.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25362 Cc: dima@secretsauce.net, 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Hello, Eli. An update. On Fri, Jan 06, 2017 at 11:37:12AM +0200, Eli Zaretskii wrote: > > Date: Fri, 6 Jan 2017 09:32:37 +0000 > > Cc: dima@secretsauce.net, 25362@debbugs.gnu.org > > From: Alan Mackenzie > > > Is this bug new in Emacs 25.1? > > Yes, it is. I've just tried the scenario out on Emacs 24.5, and it > > works OK there. > Then it would be good to have a safe enough solution that we could > install on the release branch, or, failing that, a safe workaround. There are actually two distinct bugs at work, here. One of them is simple, the fix being merely giving a limit to an invocation of c-forward-syntactic-ws. The other bug is more involved. It involves the invalidation of the whitespace cache, which is currently done incorrectly when "//" is inserted into a line which already has comment markers later on that line. It should be simple to fix, but is actually quite tricky, with a likelihood of unwanted side effects if it's not done very carefully. I might be able to fix it today, but I'm not certain of that. I've done a bisection on the repository, and the commit that "introduced" the bug didn't really introduce it at all - it merely uncovered it. That commit was 4b9ac23960d2998f899287ffcf696ad33b63a69a from 2016-07-03, "Speed up CC Mode fontification with less accurate functions extending region". As a summary, I'm not convinced that the fix I'm working on ought to go into 25.2, even though the bug is quite serious. Maybe that will clarify itself today, sometime. > Thanks. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 04:44:23 2017 Received: (at 25362) by debbugs.gnu.org; 7 Jan 2017 09:44:23 +0000 Received: from localhost ([127.0.0.1]:45602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPnXz-0004sj-0O for submit@debbugs.gnu.org; Sat, 07 Jan 2017 04:44:23 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPnXx-0004sW-MV for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 04:44:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPnXp-0007ri-Cl for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 04:44:16 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPnXp-0007re-9l; Sat, 07 Jan 2017 04:44:13 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2126 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cPnXo-0007dD-Gh; Sat, 07 Jan 2017 04:44:12 -0500 Date: Sat, 07 Jan 2017 11:44:34 +0200 Message-Id: <83shovb3wd.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20170107082023.GA3499@acm.fritz.box> (message from Alan Mackenzie on Sat, 7 Jan 2017 08:20:23 +0000) Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.fsf@gnu.org> <20170107082023.GA3499@acm.fritz.box> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-Debbugs-Envelope-To: 25362 Cc: dima@secretsauce.net, 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) > Date: Sat, 7 Jan 2017 08:20:23 +0000 > Cc: dima@secretsauce.net, 25362@debbugs.gnu.org > From: Alan Mackenzie > > There are actually two distinct bugs at work, here. One of them is > simple, the fix being merely giving a limit to an invocation of > c-forward-syntactic-ws. Does doing that prevent the infloop? > The other bug is more involved. It involves the invalidation of the > whitespace cache, which is currently done incorrectly when "//" is > inserted into a line which already has comment markers later on that > line. It should be simple to fix, but is actually quite tricky, with a > likelihood of unwanted side effects if it's not done very carefully. I > might be able to fix it today, but I'm not certain of that. > > I've done a bisection on the repository, and the commit that > "introduced" the bug didn't really introduce it at all - it merely > uncovered it. That commit was 4b9ac23960d2998f899287ffcf696ad33b63a69a > from 2016-07-03, "Speed up CC Mode fontification with less accurate > functions extending region". If no better solution emerges, would it make sense to revert 4b9ac23 on the release branch, as a temporary workaround that prevents the infloop? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 05:27:28 2017 Received: (at 25362) by debbugs.gnu.org; 7 Jan 2017 10:27:29 +0000 Received: from localhost ([127.0.0.1]:45611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPoDg-0005sb-N0 for submit@debbugs.gnu.org; Sat, 07 Jan 2017 05:27:28 -0500 Received: from ocolin.muc.de ([193.149.48.4]:52240 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cPoDe-0005sS-LH for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 05:27:27 -0500 Received: (qmail 82800 invoked by uid 3782); 7 Jan 2017 10:27:25 -0000 Received: from acm.muc.de (p548C75D0.dip0.t-ipconnect.de [84.140.117.208]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 07 Jan 2017 11:27:24 +0100 Received: (qmail 4517 invoked by uid 1000); 7 Jan 2017 10:27:10 -0000 Date: Sat, 7 Jan 2017 10:27:10 +0000 To: Eli Zaretskii Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop Message-ID: <20170107102709.GB3499@acm.fritz.box> References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.fsf@gnu.org> <20170107082023.GA3499@acm.fritz.box> <83shovb3wd.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83shovb3wd.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25362 Cc: dima@secretsauce.net, 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Hello, Eli. On Sat, Jan 07, 2017 at 11:44:34AM +0200, Eli Zaretskii wrote: > > Date: Sat, 7 Jan 2017 08:20:23 +0000 > > Cc: dima@secretsauce.net, 25362@debbugs.gnu.org > > From: Alan Mackenzie > > There are actually two distinct bugs at work, here. One of them is > > simple, the fix being merely giving a limit to an invocation of > > c-forward-syntactic-ws. > Does doing that prevent the infloop? It prevents one infloop, but not the other one, which happens after the first one is fixed. > > The other bug is more involved. It involves the invalidation of the > > whitespace cache, which is currently done incorrectly when "//" is > > inserted into a line which already has comment markers later on that > > line. It should be simple to fix, but is actually quite tricky, with a > > likelihood of unwanted side effects if it's not done very carefully. I > > might be able to fix it today, but I'm not certain of that. > > I've done a bisection on the repository, and the commit that > > "introduced" the bug didn't really introduce it at all - it merely > > uncovered it. That commit was 4b9ac23960d2998f899287ffcf696ad33b63a69a > > from 2016-07-03, "Speed up CC Mode fontification with less accurate > > functions extending region". > If no better solution emerges, would it make sense to revert 4b9ac23 > on the release branch, as a temporary workaround that prevents the > infloop? Apologies, that commit is only in master, not the emacs-25 branch. I'll need to do some more careful bisection. I'll get back to you later. > Thanks. -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 11:31:50 2017 Received: (at 25362) by debbugs.gnu.org; 7 Jan 2017 16:31:50 +0000 Received: from localhost ([127.0.0.1]:46154 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPtuH-00015S-Vg for submit@debbugs.gnu.org; Sat, 07 Jan 2017 11:31:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPtuF-00015F-Ji for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 11:31:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cPtu6-00089e-Iq for 25362@debbugs.gnu.org; Sat, 07 Jan 2017 11:31:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cPtu6-00089Z-FT; Sat, 07 Jan 2017 11:31:38 -0500 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2827 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cPtu3-0004M8-M6; Sat, 07 Jan 2017 11:31:38 -0500 Date: Sat, 07 Jan 2017 18:31:52 +0200 Message-Id: <83o9zibzlz.fsf@gnu.org> From: Eli Zaretskii To: Alan Mackenzie In-reply-to: <20170107162907.GC3499@acm.fritz.box> (message from Alan Mackenzie on Sat, 7 Jan 2017 16:29:08 +0000) Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.fsf@gnu.org> <20170107082023.GA3499@acm.fritz.box> <83shovb3wd.fsf@gnu.org> <20170107162907.GC3499@acm.fritz.box> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -8.2 (--------) X-Debbugs-Envelope-To: 25362 Cc: 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -8.2 (--------) > Date: Sat, 7 Jan 2017 16:29:08 +0000 > From: Alan Mackenzie > > Sorry, I've made a mistake with my testing, somehow, probably by > forgetting -Q. Dima's test runs flawlessly on Emacs 25.1, and also runs > flawlessly on the pretest 25.1.91, both being started with -Q. It also > runs flawlessly on the emacs-25 branch, updated ~20 minutes ago. Thanks, this means Emacs 25.2 is off the hook. > I believe that 4b9ac23 was indeed the change that uncovered this bug in > master. I'll carry on working on it in the master branch. Thank you. From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 11:38:04 2017 Received: (at control) by debbugs.gnu.org; 7 Jan 2017 16:38:04 +0000 Received: from localhost ([127.0.0.1]:46159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPu0J-0001FF-P1 for submit@debbugs.gnu.org; Sat, 07 Jan 2017 11:38:03 -0500 Received: from mail-io0-f180.google.com ([209.85.223.180]:33426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cPu0H-0001Ek-O3 for control@debbugs.gnu.org; Sat, 07 Jan 2017 11:38:02 -0500 Received: by mail-io0-f180.google.com with SMTP id v96so53636060ioi.0 for ; Sat, 07 Jan 2017 08:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=QpTA1PwsSokQEUyMI8Fn1wLlCmK3qlSbP3t3JBeOI4E=; b=FEUgmyXwOEqs0ruuUpdRzjNYGbP0unRzXg4Dmq4SkLUTTTub46dx0IgXMakY0APJKD gji8wWHUAvne7CUrSNuXE6pZ1nLUfAXIJjpPUH8amUx9vsu2zmC4I7o0Ys7ZY2BcAwoH jMnwCNqTshoP6hRRjrcQ06cD5MuFyCZ9fI6Podh0qIRgY6VdsBgAUqGcaKMSOZHDEX0C BGMqEPX8sajwsEAftk3vt0wkU14axUKwgoP2prThiUK7PoknRNdKUaXQ73iooKkTAJwR m50r+sn8R2e7s0O5wXA79BslNO3H23GAVwSx8giBzycuPmz093acQm0KUkR9HVhQy0h+ moZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=QpTA1PwsSokQEUyMI8Fn1wLlCmK3qlSbP3t3JBeOI4E=; b=U24reHgYG3pcAWeLqjVJcRj64UFxJvOL6ZX4HadGWyfGJOTTZi6gHcNPZU5XGbc/rS bFDI7NJ7yPOlh8RmIhJ9SVfUhZJNsnpgdB4Pm/A49/j6dP5hCntb6lObkSH3TQjvcxGu WFPxVTOdR5EtwWrJb78TAb693Yvg1viDxYejzSm4t1AQIS7Zb2I+e41o8ubYT3b3xUlZ 8dCVd5BhvI7tefGz6J/vkKv54nSqkCxx3t27cvU3ucbOfXAy+uMjdXND59GIaH2ycwde pZids7RFA6CbCayjYsTLcOTF42nqiXnX6NoXMcFkE+UWDQKEhQtcJdnf6ATRYk0ldr79 lYyw== X-Gm-Message-State: AIkVDXLtk1tGZs9kVh3lJE0z4jcGxaDTDN/iQJ/wpj2zP9TYFjC8uussts6LpFksOn7kfA== X-Received: by 10.107.34.70 with SMTP id i67mr23024491ioi.140.1483807075436; Sat, 07 Jan 2017 08:37:55 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id j143sm4344471ita.1.2017.01.07.08.37.54 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Jan 2017 08:37:54 -0800 (PST) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop References: <20170105205452.GA808@acm.fritz.box> <83tw9cd49l.fsf@gnu.org> <20170106093237.GA2118@acm.fritz.box> <83h95ccywn.fsf@gnu.org> <20170107082023.GA3499@acm.fritz.box> <83shovb3wd.fsf@gnu.org> <20170107162907.GC3499@acm.fritz.box> <83o9zibzlz.fsf@gnu.org> Date: Sat, 07 Jan 2017 11:38:57 -0500 In-Reply-To: <83o9zibzlz.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 07 Jan 2017 18:31:52 +0200") Message-ID: <87pojy3jvi.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) notfound 25362 25.1 quit Eli Zaretskii writes: >> Date: Sat, 7 Jan 2017 16:29:08 +0000 >> From: Alan Mackenzie >> >> Sorry, I've made a mistake with my testing, somehow, probably by >> forgetting -Q. Dima's test runs flawlessly on Emacs 25.1, and also runs >> flawlessly on the pretest 25.1.91, both being started with -Q. It also >> runs flawlessly on the emacs-25 branch, updated ~20 minutes ago. > > Thanks, this means Emacs 25.2 is off the hook. > >> I believe that 4b9ac23 was indeed the change that uncovered this bug in >> master. I'll carry on working on it in the master branch. > > Thank you. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 16:18:19 2017 Received: (at 25362) by debbugs.gnu.org; 9 Jan 2017 21:18:20 +0000 Received: from localhost ([127.0.0.1]:48136 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQhKd-0006h7-HC for submit@debbugs.gnu.org; Mon, 09 Jan 2017 16:18:19 -0500 Received: from ocolin.muc.de ([193.149.48.4]:46552 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cQhKb-0006gy-BK for 25362@debbugs.gnu.org; Mon, 09 Jan 2017 16:18:18 -0500 Received: (qmail 45239 invoked by uid 3782); 9 Jan 2017 21:18:15 -0000 Received: from acm.muc.de (p548C7205.dip0.t-ipconnect.de [84.140.114.5]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 09 Jan 2017 22:18:14 +0100 Received: (qmail 4796 invoked by uid 1000); 9 Jan 2017 21:18:01 -0000 Date: Mon, 9 Jan 2017 21:18:01 +0000 To: Dima Kogan Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop Message-ID: <20170109211801.GA4752@acm.fritz.box> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25362 Cc: Eli Zaretskii , 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Hello again, Dima. On Wed, Jan 04, 2017 at 03:37:25PM -0800, Dima Kogan wrote: > Hi. I'm using a very recent emacs built from master: > eb3416016b4 > I'm observing (comment-region) go into an infinite loop when presented > with particular data. I'm attaching a small source file that > demonstrates the issue. To see it break, run this: > emacs --eval '(add-hook (quote c-mode-common-hook) (lambda () (setq comment-start "//" comment-end "")))' \ > --eval '(global-set-key (kbd "") (lambda () (interactive) (comment-region 16 45)))' \ > -Q tst6.c > This loads the demo file with a clean configuration, and runs two bits > of lisp: > 1. Sets up a c++ commenting style. This is required for the issue to > present itself > 2. Binds f5 to run the problematic (comment-region) > On my machine, invoking emacs that way, and then hitting f5 shows the problem. > void f(void) > { > > g( // output > s ); > > } As already observed, this bug happens simply in C Mode by attempting to comment out the four lines inside the function, doing this by marking the lines then C-c C-c. The cause was a rather nasty situation where a "syntactic whitespace cache", designed to facilitate moving rapidly over large areas of WS (particularly long comments at the beginning of files) got screwed up by the insertion of "// " onto a line already containing a "//" later on. Here is a patch. It is not yet in its final form (the comments need fixing). Would you please try it out and let me know how well/how badly it works: diff -r a3e0a2a33629 cc-engine.el --- a/cc-engine.el Sat Dec 31 16:59:41 2016 +0000 +++ b/cc-engine.el Mon Jan 09 21:03:52 2017 +0000 @@ -1712,46 +1712,122 @@ `((c-debug-remove-face beg end 'c-debug-is-sws-face) (c-debug-remove-face beg end 'c-debug-in-sws-face))))) -(defsubst c-invalidate-sws-region-after (beg end) +;; The type of literal position `end' is in in a `before-change-functions' +;; function - one of `c', `c++', `string', `pound', or nil. +(defvar c-sws-lit-type nil) +;; A cons (BEG . END) of the literal/CPP construct enclosing END, if any, else +;; nil. +(defvar c-sws-lit-limits nil) + +(defun c-invalidate-sws-region-before (end) + ;; Called from c-before-change. END is the end of the change region, the + ;; standard parameter given to all before-change-functions. + ;; + ;; Note whether END is inside a comment of CPP construct, and if so note its + ;; bounds. + (save-excursion + (goto-char end) + (let* ((limits (c-literal-limits)) + (lit-type (c-literal-type limits))) + (cond + ((memq lit-type '(c c++)) + (setq c-sws-lit-type lit-type + c-sws-lit-limits limits)) + ((c-beginning-of-macro) + (setq c-sws-lit-type 'pound + c-sws-lit-limits (cons (point) + (progn (c-end-of-macro) (point))))) + (t (setq c-sws-lit-type nil + c-sws-lit-limits nil)))))) + +(defun c-invalidate-sws-region-after-del (beg end old-len) + ;; Text has been deleted, OLD-LEN characters of it starting from position + ;; BEG. END is typically eq to BEG. Should there have been a comment or + ;; CPP construct open at END before the deletion, check whether this + ;; deletion deleted or "damaged" its opening delimiter. If so, return the + ;; current position of where the construct ended, otherwise return nil. + (when c-sws-lit-limits + (setcdr c-sws-lit-limits (- (cdr c-sws-lit-limits) old-len)) + (if (and (< beg (+ (car c-sws-lit-limits) 2)) + (or (get-text-property end 'c-in-sws) + (next-single-property-change end 'c-in-sws nil + (cdr c-sws-lit-limits)) + (get-text-property end 'c-is-sws) + (next-single-property-change end 'c-is-sws nil + (cdr c-sws-lit-limits)))) + (cdr c-sws-lit-limits)))) + +(defun c-invalidate-sws-region-after-ins (end) + ;; Text has been inserted, ending at buffer position END. Should there be a + ;; literal or CPP construct open at END, check whether there are `c-in-sws' + ;; or `c-is-sws' text properties inside this literal. If there are, return + ;; the buffer position of the end of the literal, else return nil. + (save-excursion + (let* ((limits (c-literal-limits)) + (lit-type (c-literal-type limits))) + (goto-char end) + (when (and (not (memq lit-type '(c c++))) + (c-beginning-of-macro)) + (setq lit-type 'pound + limits (cons (point) + (progn (c-end-of-macro) (point))))) + (when (memq lit-type '(c c++ pound)) + (let ((next-in (next-single-property-change (car limits) 'c-in-sws + nil (cdr limits))) + (next-is (next-single-property-change (car limits) 'c-is-sws + nil (cdr limits)))) + (and (or next-in next-is) + (cdr limits))))))) + +(defun c-invalidate-sws-region-after (beg end old-len) ;; Called from `after-change-functions'. Note that if ;; `c-forward-sws' or `c-backward-sws' are used outside ;; `c-save-buffer-state' or similar then this will remove the cache ;; properties right after they're added. ;; ;; This function does hidden buffer changes. - - (save-excursion - ;; Adjust the end to remove the properties in any following simple - ;; ws up to and including the next line break, if there is any - ;; after the changed region. This is necessary e.g. when a rung - ;; marked empty line is converted to a line comment by inserting - ;; "//" before the line break. In that case the line break would - ;; keep the rung mark which could make a later `c-backward-sws' - ;; move into the line comment instead of over it. - (goto-char end) - (skip-chars-forward " \t\f\v") - (when (and (eolp) (not (eobp))) - (setq end (1+ (point))))) - - (when (and (= beg end) - (get-text-property beg 'c-in-sws) - (> beg (point-min)) - (get-text-property (1- beg) 'c-in-sws)) - ;; Ensure that an `c-in-sws' range gets broken. Note that it isn't - ;; safe to keep a range that was continuous before the change. E.g: - ;; - ;; #define foo - ;; \ - ;; bar - ;; - ;; There can be a "ladder" between "#" and "b". Now, if the newline - ;; after "foo" is removed then "bar" will become part of the cpp - ;; directive instead of a syntactically relevant token. In that - ;; case there's no longer syntactic ws from "#" to "b". - (setq beg (1- beg))) - - (c-debug-sws-msg "c-invalidate-sws-region-after [%s..%s]" beg end) - (c-remove-is-and-in-sws beg end)) + (let ((del-end + (and (> old-len 0) + (c-invalidate-sws-region-after-del beg end old-len))) + (ins-end + (and (> end beg) + (c-invalidate-sws-region-after-ins end)))) + (save-excursion + ;; Adjust the end to remove the properties in any following simple + ;; ws up to and including the next line break, if there is any + ;; after the changed region. This is necessary e.g. when a rung + ;; marked empty line is converted to a line comment by inserting + ;; "//" before the line break. In that case the line break would + ;; keep the rung mark which could make a later `c-backward-sws' + ;; move into the line comment instead of over it. + (goto-char end) + (skip-chars-forward " \t\f\v") + (when (and (eolp) (not (eobp))) + (setq end (1+ (point))))) + + (when (and (= beg end) + (get-text-property beg 'c-in-sws) + (> beg (point-min)) + (get-text-property (1- beg) 'c-in-sws)) + ;; Ensure that an `c-in-sws' range gets broken. Note that it isn't + ;; safe to keep a range that was continuous before the change. E.g: + ;; + ;; #define foo + ;; \ + ;; bar + ;; + ;; There can be a "ladder" between "#" and "b". Now, if the newline + ;; after "foo" is removed then "bar" will become part of the cpp + ;; directive instead of a syntactically relevant token. In that + ;; case there's no longer syntactic ws from "#" to "b". + (setq beg (1- beg))) + + (setq end (max (or del-end end) + (or ins-end end) + end)) + + (c-debug-sws-msg "c-invalidate-sws-region-after [%s..%s]" beg end) + (c-remove-is-and-in-sws beg end))) (defun c-forward-sws () ;; Used by `c-forward-syntactic-ws' to implement the unbounded search. diff -r a3e0a2a33629 cc-langs.el --- a/cc-langs.el Sat Dec 31 16:59:41 2016 +0000 +++ b/cc-langs.el Mon Jan 09 21:03:52 2017 +0000 @@ -1428,6 +1428,15 @@ t "*/" awk nil) +(c-lang-defconst c-block-comment-ender-regexp + ;; Regexp which matches the end of a block comment (if such exists in the + ;; language) + t (if (c-lang-const c-block-comment-ender) + (regexp-quote (c-lang-const c-block-comment-ender)) + "\\<\\>")) +(c-lang-defvar c-block-comment-ender-regexp + (c-lang-const c-block-comment-ender-regexp)) + (c-lang-defconst c-comment-start-regexp ;; Regexp to match the start of any type of comment. t (let ((re (c-make-keywords-re nil diff -r a3e0a2a33629 cc-mode.el --- a/cc-mode.el Sat Dec 31 16:59:41 2016 +0000 +++ b/cc-mode.el Mon Jan 09 21:03:52 2017 +0000 @@ -1189,6 +1189,7 @@ ;; Are we coalescing two tokens together, e.g. "fo o" -> "foo"? (when (< beg end) (c-unfind-coalesced-tokens beg end)) + (c-invalidate-sws-region-before end) ;; Are we (potentially) disrupting the syntactic context which ;; makes a type a type? E.g. by inserting stuff after "foo" in ;; "foo bar;", or before "foo" in "typedef foo *bar;"? @@ -1314,7 +1315,7 @@ (c-clear-char-property-with-value beg end 'syntax-table nil))) (c-trim-found-types beg end old-len) ; maybe we don't need all of these. - (c-invalidate-sws-region-after beg end) + (c-invalidate-sws-region-after beg end old-len) ;; (c-invalidate-state-cache beg) ; moved to `c-before-change'. (c-invalidate-find-decl-cache beg) Thanks for this rather obscure bug report. :-) -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 16:46:32 2017 Received: (at 25362) by debbugs.gnu.org; 9 Jan 2017 21:46:32 +0000 Received: from localhost ([127.0.0.1]:48178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQhlw-0007PU-2b for submit@debbugs.gnu.org; Mon, 09 Jan 2017 16:46:32 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:43350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQhlu-0007PL-2q for 25362@debbugs.gnu.org; Mon, 09 Jan 2017 16:46:30 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8157521CAD; Mon, 9 Jan 2017 16:46:29 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 09 Jan 2017 16:46:29 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=0JrLUvr6qztAG15/CaG6Ngo5UY8=; b=gkP9kl gH0vhZmsUgA15K3je4pn/7KU+wOWRhf72U87o0HsPAwV4V1eDyc6ia9JSmmxPK1D zhQgBKLB/O+BbJPiVe8UF2gEjxr7VoVMx6CRWH1dDnVegBd+R34Iaeh3nK/o6kv4 z1yntp8vqIJtwdL3/F26jb0JdVC19eofDTnjE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=0JrLUvr6qztAG1 5/CaG6Ngo5UY8=; b=H8ru2S2yCgAh1lWVhcdi/R6Bfhz2RsU+UtinCFVf3j9jHc 4QJrgmkvJA7uUB37ZzmfrJ7Hk0UjWFJp3zNHbCmegap9mUTVmA3/QGAI8IQ3QjN+ 2Idlg0OxO7LK0Tld48SeFRBsfU1TB3A0lroewxgDTD7QJMmj0nLoqVnNmaW08= X-ME-Sender: X-Sasl-enc: jeO/uJF4rF3zz94OXMEbknB7xOrYCrSZo3pRaYVHbXzS 1483998389 Received: from shorty.local (unknown [128.149.110.210]) by mail.messagingengine.com (Postfix) with ESMTPA id 3C7312478B; Mon, 9 Jan 2017 16:46:29 -0500 (EST) Received: from dima by shorty.local with local (Exim 4.88) (envelope-from ) id 1cQhls-0003lv-5E; Mon, 09 Jan 2017 13:46:28 -0800 References: <20170109211801.GA4752@acm.fritz.box> User-agent: mu4e 0.9.17; emacs 26.0.50.1 From: Dima Kogan To: Alan Mackenzie Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop In-reply-to: <20170109211801.GA4752@acm.fritz.box> Date: Mon, 09 Jan 2017 13:46:28 -0800 Message-ID: <87pojvlxe3.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 25362 Cc: Eli Zaretskii , 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Alan Mackenzie writes: > Hello again, Dima. > > As already observed, this bug happens simply in C Mode by attempting to > comment out the four lines inside the function, doing this by marking > the lines then C-c C-c. > > The cause was a rather nasty situation where a "syntactic whitespace > cache", designed to facilitate moving rapidly over large areas of WS > (particularly long comments at the beginning of files) got screwed up by > the insertion of "// " onto a line already containing a "//" later on. > > Here is a patch. It is not yet in its final form (the comments need > fixing). Would you please try it out and let me know how well/how badly > it works: Hi. I'm now running with this patch, and some cursory testing says that it works. I briefly ran into an issue where I 1. highlighted a problematic region 2. hit M-; (this worked correctly) 3. Hit M-/ to undo This undo restored the text correctly, but the whole region remained highlighted as a comment, even after the undo removed the comment characters. I hit this once, but cannot reproduce it anymore. If this description means something to you, feel free to act on it :) > Thanks for this rather obscure bug report. :-) Heh. I just report issues that pop up during the course of the day. We owe you hugely for responding to these bugs and maintaining cc-mode. Thanks! From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 09 17:04:57 2017 Received: (at 25362) by debbugs.gnu.org; 9 Jan 2017 22:04:57 +0000 Received: from localhost ([127.0.0.1]:48212 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQi3j-0007tx-Jr for submit@debbugs.gnu.org; Mon, 09 Jan 2017 17:04:57 -0500 Received: from ocolin.muc.de ([193.149.48.4]:22677 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cQi3i-0007tn-BN for 25362@debbugs.gnu.org; Mon, 09 Jan 2017 17:04:54 -0500 Received: (qmail 54207 invoked by uid 3782); 9 Jan 2017 22:04:52 -0000 Received: from acm.muc.de (p548C7205.dip0.t-ipconnect.de [84.140.114.5]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 09 Jan 2017 23:04:52 +0100 Received: (qmail 5354 invoked by uid 1000); 9 Jan 2017 22:04:39 -0000 Date: Mon, 9 Jan 2017 22:04:39 +0000 To: Dima Kogan Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop Message-ID: <20170109220439.GA4725@acm.fritz.box> References: <20170109211801.GA4752@acm.fritz.box> <87pojvlxe3.fsf@secretsauce.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pojvlxe3.fsf@secretsauce.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25362 Cc: Eli Zaretskii , 25362@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Hello, Dima On Mon, Jan 09, 2017 at 01:46:28PM -0800, Dima Kogan wrote: > Alan Mackenzie writes: > > As already observed, this bug happens simply in C Mode by attempting to > > comment out the four lines inside the function, doing this by marking > > the lines then C-c C-c. > > The cause was a rather nasty situation where a "syntactic whitespace > > cache", designed to facilitate moving rapidly over large areas of WS > > (particularly long comments at the beginning of files) got screwed up by > > the insertion of "// " onto a line already containing a "//" later on. > > Here is a patch. It is not yet in its final form (the comments need > > fixing). Would you please try it out and let me know how well/how badly > > it works: > Hi. I'm now running with this patch, and some cursory testing says that > it works. I briefly ran into an issue where I > 1. highlighted a problematic region > 2. hit M-; (this worked correctly) > 3. Hit M-/ to undo > This undo restored the text correctly, but the whole region remained > highlighted as a comment, even after the undo removed the comment > characters. I hit this once, but cannot reproduce it anymore. If this > description means something to you, feel free to act on it :) I'll have a think about this some time (it's late at night in Europe, now). > > Thanks for this rather obscure bug report. :-) > Heh. I just report issues that pop up during the course of the day. We > owe you hugely for responding to these bugs and maintaining cc-mode. > Thanks! That's appreciated! -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 11 13:32:20 2017 Received: (at 25362-done) by debbugs.gnu.org; 11 Jan 2017 18:32:21 +0000 Received: from localhost ([127.0.0.1]:50174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRNh6-0006w0-Qw for submit@debbugs.gnu.org; Wed, 11 Jan 2017 13:32:20 -0500 Received: from ocolin.muc.de ([193.149.48.4]:49740 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cRNh3-0006vq-ME for 25362-done@debbugs.gnu.org; Wed, 11 Jan 2017 13:32:18 -0500 Received: (qmail 20550 invoked by uid 3782); 11 Jan 2017 18:32:16 -0000 Received: from acm.muc.de (p548C6F69.dip0.t-ipconnect.de [84.140.111.105]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 11 Jan 2017 19:32:15 +0100 Received: (qmail 25546 invoked by uid 1000); 11 Jan 2017 18:32:02 -0000 Date: Wed, 11 Jan 2017 18:32:02 +0000 To: 25362-done@debbugs.gnu.org Subject: Re: bug#25362: 26.0.50; comment-region goes into an infinite loop Message-ID: <20170111183202.GC10374@acm.fritz.box> References: <20170109211801.GA4752@acm.fritz.box> <87pojvlxe3.fsf@secretsauce.net> <20170109220439.GA4725@acm.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170109220439.GA4725@acm.fritz.box> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25362-done Cc: Eli Zaretskii , Dima Kogan X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Bug fixed. Closing. -- Alan Mackenzie (Nuremberg, Germany). From unknown Sat Aug 09 15:56:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 09 Feb 2017 12: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