From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23869: 25.0.95; replace-match can crash emacs Date: Wed, 29 Jun 2016 18:37:02 +0300 Message-ID: <837fd8vwf5.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1467214712 20515 80.91.229.3 (29 Jun 2016 15:38:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jun 2016 15:38:32 +0000 (UTC) Cc: 23869@debbugs.gnu.org To: Leo Liu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 29 17:38:22 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bIHZB-0002pm-T8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Jun 2016 17:38:18 +0200 Original-Received: from localhost ([::1]:44491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIHZB-0006Zy-1Z for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Jun 2016 11:38:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIHZ1-0006XT-EC for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 11:38:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIHYw-0001Ny-AI for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 11:38:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:47912) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIHYw-0001Nu-7G for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 11:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bIHYw-0006ar-3O for bug-gnu-emacs@gnu.org; Wed, 29 Jun 2016 11:38:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Jun 2016 15:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23869 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23869-submit@debbugs.gnu.org id=B23869.146721466225317 (code B ref 23869); Wed, 29 Jun 2016 15:38:02 +0000 Original-Received: (at 23869) by debbugs.gnu.org; 29 Jun 2016 15:37:42 +0000 Original-Received: from localhost ([127.0.0.1]:60249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIHYc-0006aG-72 for submit@debbugs.gnu.org; Wed, 29 Jun 2016 11:37:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39592) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bIHYa-0006a4-58 for 23869@debbugs.gnu.org; Wed, 29 Jun 2016 11:37:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIHYQ-0001Ie-TR for 23869@debbugs.gnu.org; Wed, 29 Jun 2016 11:37:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIHYQ-0001Ia-QO; Wed, 29 Jun 2016 11:37:30 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1174 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bIHYO-0000Kr-85; Wed, 29 Jun 2016 11:37:29 -0400 In-reply-to: (message from Leo Liu on Wed, 29 Jun 2016 22:17:20 +0800) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120212 Archived-At: > From: Leo Liu > Date: Wed, 29 Jun 2016 22:17:20 +0800 > > Under some circumstances replace-match can crash emacs. It takes a lot > to reproduce the crash and I haven't been able to find a minimal > example. But I wonder if the backtrace that I captured in LLDB can give > any clue to the clause? I can't reproduce the same crash in emacs24. Do you still have this crashed session in a debugger? Because some of the values involved in this crash are not clear or not shown. > frame #1: 0x000000010028356a emacs`set_point_both(charpos=-1, bytepos=-1) + 234 at intervals.c:1921 > frame #2: 0x0000000100283476 emacs`set_point(charpos=-1) + 54 at intervals.c:1816 > frame #3: 0x0000000100284597 emacs`move_if_not_intangible(position=-1) + 855 at intervals.c:2157 The immediate reason is obviously the POSITION = -1 above, but the question is: how did replace-match allow that to happen? It's a large function, so it's hard to tell how this could happen without seeing some of the variables there. Do you perhaps remember or know what text was replaced by what when this happened?