From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.bugs Subject: bug#15344: 24.3; Crash when yanking in c-mode Date: Mon, 13 Jan 2014 06:11:29 -0800 Message-ID: <52D3F411.5000803@dancol.org> References: <5230C14B.8050208@matholka.se> <523F32AE.3070702@matholka.se> <87iotoknl5.fsf@zigzag.favinet> <52D3F145.7050107@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1389622337 23019 80.91.229.3 (13 Jan 2014 14:12:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Jan 2014 14:12:17 +0000 (UTC) Cc: Lars Ljung To: Thien-Thi Nguyen , 15344@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 13 15:12:21 2014 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 1W2iFX-0005i4-M6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Jan 2014 15:12:19 +0100 Original-Received: from localhost ([::1]:42748 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2iFS-0000v7-TT for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Jan 2014 09:12:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2iFL-0000ug-GE for bug-gnu-emacs@gnu.org; Mon, 13 Jan 2014 09:12:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2iFG-0005V1-BQ for bug-gnu-emacs@gnu.org; Mon, 13 Jan 2014 09:12:07 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2iFG-0005Ut-7w for bug-gnu-emacs@gnu.org; Mon, 13 Jan 2014 09:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W2iFF-00054A-SC for bug-gnu-emacs@gnu.org; Mon, 13 Jan 2014 09:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Colascione Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Jan 2014 14:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15344 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 15344-submit@debbugs.gnu.org id=B15344.138962229919434 (code B ref 15344); Mon, 13 Jan 2014 14:12:01 +0000 Original-Received: (at 15344) by debbugs.gnu.org; 13 Jan 2014 14:11:39 +0000 Original-Received: from localhost ([127.0.0.1]:48627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W2iEs-00053M-VY for submit@debbugs.gnu.org; Mon, 13 Jan 2014 09:11:39 -0500 Original-Received: from dancol.org ([96.126.100.184]:40961) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W2iEq-00053C-C5 for 15344@debbugs.gnu.org; Mon, 13 Jan 2014 09:11:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=U/EYihYqyK6YPIrEPbcxpCxTgfXjPBJbYW4r8TOYoYc=; b=op56empaajOSpsX63BfX10eETMosAFpqZzbGKwzCf2O95yzq8DuWh+nTIGS7EaF4+agkxMIu5FVOyiMbLNqYmvyIFnDS2bz2E43Lsx6FgR7YrEzxVX1BQxx2nkPZ/HnRnXhmOC5GpbGDIN/Ma7ml2Hm+0a20TszjLCy2auDVwI8pBoKHEanEwMmztbwag55DFy+FKB0vNR/g4SvCYl3KhvaPwc4nX2iQoEqj8rlYYnbABvfiSYQYKrHB/8ubtRZsCQIhfegBZwXLOO7RKzwFXAVjMn2k60OAkYdfVKsI7KOCgDkcSLA7fPOO1nWLLWMGt3wo/qz8ByNRNa0TGgKbxQ==; Original-Received: from [2620:0:1cfe:99::7] by dancol.org with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1W2iEp-0008AV-PB; Mon, 13 Jan 2014 06:11:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <52D3F145.7050107@dancol.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83401 Archived-At: On 01/13/2014 05:59 AM, Daniel Colascione wrote: > On 01/13/2014 05:39 AM, Thien-Thi Nguyen wrote: >> Here is a script to make debugging easier: > > Thanks. Does this patch have any unwanted side effects? It seems > perfectly reasonable to me that we could reach the end of the interval > tree without finding anything to modify or going past our bound. > > === modified file 'src/textprop.c' Actually, you probably want this one. === modified file 'src/textprop.c' --- src/textprop.c 2014-01-01 07:43:34 +0000 +++ src/textprop.c 2014-01-13 14:07:21 +0000 @@ -1741,6 +1741,17 @@ } len -= LENGTH (i); i = next_interval (i); + if(!i) + if (modified) + { + if (BUFFERP (object)) + signal_after_change (XINT (start), + XINT (end) - XINT (start), + XINT (end) - XINT (start)); + return Qt; + } + else + return Qnil; } }