From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: 23.3; Crash in indirect buffer Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Mar 2011 20:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 8219@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12997886964637 (code B ref -1); Thu, 10 Mar 2011 20:25:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Mar 2011 20:24:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxmPn-0001Ck-AI for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:24:55 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxmPl-0001CX-1c for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:24:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxmPe-0002U2-RY for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:24:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:35416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxmPe-0002Ty-Md for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:24:46 -0500 Received: from [140.186.70.92] (port=43706 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxmPd-00011s-FR for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2011 15:24:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxmPb-0002T6-Gi for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2011 15:24:45 -0500 Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]:46576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxmPb-0002Sd-Ev for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2011 15:24:43 -0500 Received: from furball (dhcp128036014208.central.yale.edu [128.36.14.208]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2AKOfuk020935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 10 Mar 2011 15:24:41 -0500 Received: by furball (Postfix, from userid 1000) id 87938160401; Thu, 10 Mar 2011 15:24:41 -0500 (EST) From: Chong Yidong Date: Thu, 10 Mar 2011 15:24:41 -0500 Message-ID: <87ei6e206u.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -4.7 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -4.7 (----) Just came across this; it is present in (at least) 23.2, and in trunk. I haven't had time to debug further; any help welcome. The backtrace is from trunk. emacs -Q M-< M-x clone-indirect-buffer RET C-n C-k C-x o C-k => abort #0 abort () at emacs.c:372 #1 0x0000000000646ba0 in find_interval (tree=0xc569e0, position=78) at intervals.c:635 #2 0x0000000000649c9c in get_property_and_range (pos=78, prop=12679682, val=0x7fffffffacd8, start=0x7ffffffface8, end=0x7ffffffface0, object=22411973) at intervals.c:2263 #3 0x0000000000651631 in find_composition (pos=78, limit=-1, start=0x7ffffffface8, end=0x7ffffffface0, prop=0x7fffffffacd8, object=22411973) at composite.c:430 #4 0x0000000000448290 in check_point_in_composition (prev_buf=0x155fac0, prev_pt=78, buf=0x155fac0, pt=2) at xdisp.c:11311 #5 0x0000000000448857 in reconsider_clip_changes (w=0x1564480, b=0x155fac0) at xdisp.c:11358 #6 0x000000000044f0d7 in redisplay_window (window=22430853, just_this_one_p=0) at xdisp.c:13715 #7 0x000000000044addc in redisplay_window_0 (window=22430853) at xdisp.c:12362 #8 0x00000000005dc1dc in internal_condition_case_1 ( bfun=0x44ad9d , arg=22430853, handlers=12412566, hfun=0x44ad6e ) at eval.c:1453 #9 0x000000000044ad4f in redisplay_windows (window=22430853) at xdisp.c:12342 #10 0x000000000044ad09 in redisplay_windows (window=22430309) at xdisp.c:12336 #11 0x0000000000449e14 in redisplay_internal (preserve_echo_area=0) at xdisp.c:11919 #12 0x0000000000447cff in redisplay () at xdisp.c:11139 #13 0x00000000005419ca in read_char (commandflag=1, nmaps=2, maps=0x7fffffffdae0, prev_event=12442194, used_mouse_menu=0x7fffffffddb8, end_time=0x0) at keyboard.c:2357 #14 0x000000000054f450 in read_key_sequence (keybuf=0x7fffffffde20, bufsize=30, prompt=12442194, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9193 #15 0x000000000053fbae in command_loop_1 () at keyboard.c:1409 #16 0x00000000005dc067 in internal_condition_case ( bfun=0x53f7f3 , handlers=12494210, hfun=0x53f0d8 ) at eval.c:1408 #17 0x000000000053f4f4 in command_loop_2 (ignore=12442194) at keyboard.c:1129 #18 0x00000000005dba31 in internal_catch (tag=12490226, func=0x53f4ce , arg=12442194) at eval.c:1152 #19 0x000000000053f4a7 in command_loop () at keyboard.c:1108 #20 0x000000000053ec0f in recursive_edit_1 () at keyboard.c:731 #21 0x000000000053edc2 in Frecursive_edit () at keyboard.c:793 #22 0x000000000053d0e8 in main (argc=2, argv=0x7fffffffe728) at emacs.c:1684 In GNU Emacs 24.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2011-03-10 on furball Windowing system distributor `The X.Org Foundation', version 11.0.10706000 configured using `configure 'CC=gcc' 'CFLAGS=-g'' From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: 23.3; Crash in indirect buffer In-Reply-To: <87ei6e206u.fsf@stupidchicken.com> Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Mar 2011 20:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: 8219@debbugs.gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.129979057410301 (code B ref 8219); Thu, 10 Mar 2011 20:57:02 +0000 Received: (at 8219) by debbugs.gnu.org; 10 Mar 2011 20:56:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pxmu5-0002g5-ST for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:56:14 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pxmu3-0002fw-7C for 8219@debbugs.gnu.org; Thu, 10 Mar 2011 15:56:11 -0500 Received: from localhost ([127.0.0.1]:36706) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pxmtx-0001Vv-Q0; Thu, 10 Mar 2011 15:56:05 -0500 From: Glenn Morris References: <87ei6e206u.fsf@stupidchicken.com> X-Spook: BATF bemd PLO Serbian oil enforcers Marxist White House X-Ran: "BZ:.6op"}"p|j7<.%;?dmrjS(*oz.gI*]llQ(;:[B;llHEK@r&`<{[EX|y+d=DZpr/N=" X-Hue: green X-Attribution: GM Date: Thu, 10 Mar 2011 15:56:05 -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: -6.3 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.3 (------) Same as http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1242 ? From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: 23.3; Crash in indirect buffer Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Mar 2011 21:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Glenn Morris Cc: 8219@debbugs.gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.129979420215688 (code B ref 8219); Thu, 10 Mar 2011 21:57:02 +0000 Received: (at 8219) by debbugs.gnu.org; 10 Mar 2011 21:56:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxnqY-00044w-OU for submit@debbugs.gnu.org; Thu, 10 Mar 2011 16:56:42 -0500 Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxnqX-00044l-Ow for 8219@debbugs.gnu.org; Thu, 10 Mar 2011 16:56:38 -0500 Received: from furball (dhcp128036014208.central.yale.edu [128.36.14.208]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2ALuVkd022720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 10 Mar 2011 16:56:31 -0500 Received: by furball (Postfix, from userid 1000) id 4E13D160401; Thu, 10 Mar 2011 16:56:32 -0500 (EST) From: Chong Yidong References: <87ei6e206u.fsf@stupidchicken.com> Date: Thu, 10 Mar 2011 16:56:32 -0500 In-Reply-To: (Glenn Morris's message of "Thu, 10 Mar 2011 15:56:05 -0500") Message-ID: <87oc5iy6zz.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Glenn Morris writes: > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=1242 I guess we can assume this is the same bug. So, now we have a reproducible recipe. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 10 17:24:50 2011 Received: (at control) by debbugs.gnu.org; 10 Mar 2011 22:24:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxoHq-0004hS-8V for submit@debbugs.gnu.org; Thu, 10 Mar 2011 17:24:50 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxoHp-0004hC-DI for control@debbugs.gnu.org; Thu, 10 Mar 2011 17:24:49 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1PxoHk-00066M-6u for control@debbugs.gnu.org; Thu, 10 Mar 2011 17:24:44 -0500 Date: Thu, 10 Mar 2011 17:24:44 -0500 Message-Id: Subject: control message for bug 8219 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.3 (------) merge 1242 8219 From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) References: <87ei6e206u.fsf@stupidchicken.com> In-Reply-To: <87ei6e206u.fsf@stupidchicken.com> Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Mar 2011 19:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: emacs-devel@gnu.org Cc: 8219@debbugs.gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.129987291015502 (code B ref 8219); Fri, 11 Mar 2011 19:49:01 +0000 Received: (at 8219) by debbugs.gnu.org; 11 Mar 2011 19:48:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Py8K6-00041z-0a for submit@debbugs.gnu.org; Fri, 11 Mar 2011 14:48:30 -0500 Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Py8K3-00041o-I3 for 8219@debbugs.gnu.org; Fri, 11 Mar 2011 14:48:28 -0500 Received: from furball (dhcp128036014143.central.yale.edu [128.36.14.143]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2BJmL4m007519 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 11 Mar 2011 14:48:21 -0500 Received: by furball (Postfix, from userid 1000) id A19181603F0; Fri, 11 Mar 2011 14:48:21 -0500 (EST) From: Chong Yidong Date: Fri, 11 Mar 2011 14:48:21 -0500 Message-ID: <877hc5bfqy.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Indirect bufffers are allowed to have their own values of point, BUF_BEGV, and BUF_ZV (indeed, that's one of their roles). Their other attributes inherit from the base buffer, e.g. #define BUF_Z(buf) ((buf)->text->z) where `text' points to the base buffer's text object. Now consider what happens when a deletion is performed in buffer A, which is the base buffer for an indirect buffer B. It appears that the responsible functions, such as del_range_2, only update the attributes of buffer A, making no effort to update buffer B. Hence, in the aftermath of a deletion, buffer B's values of PT (and BUF_BEGV and BUF_ZV) can be larger than BUF_ZV. This is the proximate cause of the crash in Bug#8219: there, we have if (prev_pt > BUF_BEGV (buf) && prev_pt < BUF_ZV (buf) && find_composition (prev_pt, -1, &start, &end, &prop, buffer) and find_composition aborts because prev_pt is larger than the size of the buffer. I'm not sure what the best solution is. The narrowest fix is to change find_composition, and the functions it calls, so that it does not abort when supplied with a position that's beyond BUF_Z. This might be the best approach for the emacs-23 branch. However, I suspect that we have other places in the code that assumes that if a point is smaller than BUF_ZV, it's necessarily smaller than BUF_Z---which we now see if not that case. So, a more comprehensive fix is needed for the trunk. Any thoughts? From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Mar 2011 20:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: 8219@debbugs.gnu.org, emacs-devel@gnu.org Reply-To: Eli Zaretskii Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.129987408017095 (code B ref 8219); Fri, 11 Mar 2011 20:08:02 +0000 Received: (at 8219) by debbugs.gnu.org; 11 Mar 2011 20:08:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Py8cy-0004Rg-IW for submit@debbugs.gnu.org; Fri, 11 Mar 2011 15:08:00 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Py8cv-0004RS-IZ for 8219@debbugs.gnu.org; Fri, 11 Mar 2011 15:07:58 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LHW00H00SJB1Y00@a-mtaout22.012.net.il> for 8219@debbugs.gnu.org; Fri, 11 Mar 2011 22:07:51 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.58.59]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LHW00F9KT92OPQ0@a-mtaout22.012.net.il>; Fri, 11 Mar 2011 22:07:51 +0200 (IST) Date: Fri, 11 Mar 2011 22:07:54 +0200 From: Eli Zaretskii In-reply-to: <877hc5bfqy.fsf@stupidchicken.com> X-012-Sender: halo1@inter.net.il Message-id: <838vwlto85.fsf@gnu.org> References: <877hc5bfqy.fsf@stupidchicken.com> X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.1 (--) > From: Chong Yidong > Date: Fri, 11 Mar 2011 14:48:21 -0500 > Cc: 8219@debbugs.gnu.org > > Now consider what happens when a deletion is performed in buffer A, > which is the base buffer for an indirect buffer B. It appears that the > responsible functions, such as del_range_2, only update the attributes > of buffer A, making no effort to update buffer B. > > Hence, in the aftermath of a deletion, buffer B's values of PT (and > BUF_BEGV and BUF_ZV) can be larger than BUF_ZV. Isn't that a bug, right there? Why doesn't del_range_2 update the indirect buffer (B) as well, when deletion removes text so that its PT becomes invalid? The ELisp manual says: The text of the indirect buffer is always identical to the text of its base buffer; changes made by editing either one are visible immediately in the other. This includes the text properties as well as the characters themselves. In all other respects, the indirect buffer and its base buffer are completely separate. They have different names, independent values of point, independent narrowing, independent markers and overlays (though inserting or deleting text in either buffer relocates the markers and overlays for both), [...] This makes a lot of sense, but your description seems to point out that the implementation does not behave according to the docs: if markers are (or should be) relocated in sync as result of insertion and deletion, the same should happen with PT, BUF_BEGV, etc. Am I missing something? If not, the solution is to update the attributes of the indirect buffer so as to preserve the invariants, like PT <= BUF_Z etc. > However, I suspect that we have other places in the code that assumes > that if a point is smaller than BUF_ZV, it's necessarily smaller than > BUF_Z It is madness IMO to allow BUF_Z and BUF_ZV be out of sync. From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Mar 2011 21:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 8219@debbugs.gnu.org, emacs-devel@gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.129987714721382 (code B ref 8219); Fri, 11 Mar 2011 21:00:04 +0000 Received: (at 8219) by debbugs.gnu.org; 11 Mar 2011 20:59:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Py9QR-0005Yo-0V for submit@debbugs.gnu.org; Fri, 11 Mar 2011 15:59:07 -0500 Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Py9QN-0005YH-4N for 8219@debbugs.gnu.org; Fri, 11 Mar 2011 15:59:04 -0500 Received: from furball (dhcp128036014143.central.yale.edu [128.36.14.143]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2BKwv8u031966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 11 Mar 2011 15:58:57 -0500 Received: by furball (Postfix, from userid 1000) id 7096F1605F5; Fri, 11 Mar 2011 15:58:57 -0500 (EST) From: Chong Yidong References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> Date: Fri, 11 Mar 2011 15:58:57 -0500 In-Reply-To: <838vwlto85.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Mar 2011 22:07:54 +0200") Message-ID: <874o79nzla.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Eli Zaretskii writes: >> Hence, in the aftermath of a deletion, buffer B's values of PT (and >> BUF_BEGV and BUF_ZV) can be larger than BUF_ZV. > > Isn't that a bug, right there? Why doesn't del_range_2 update the > indirect buffer (B) as well, when deletion removes text so that its PT > becomes invalid? This is not currently easy. We don't keep track of indirect buffers (looping over the buffer list each time we do a deletion would be rather inefficient), so this would need some new members of the buffer struct. From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Mar 2011 23:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Chong Yidong , 8219@debbugs.gnu.org, emacs-devel@gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.12998855751131 (code B ref 8219); Fri, 11 Mar 2011 23:20:02 +0000 Received: (at 8219) by debbugs.gnu.org; 11 Mar 2011 23:19:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyBcM-0000IC-HW for submit@debbugs.gnu.org; Fri, 11 Mar 2011 18:19:34 -0500 Received: from tomts36-srv.bellnexxia.net ([209.226.175.93]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyBcK-0000I1-Jt for 8219@debbugs.gnu.org; Fri, 11 Mar 2011 18:19:33 -0500 Received: from toip3.srvr.bell.ca ([209.226.175.86]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20110311231926.IRDQ2196.tomts36-srv.bellnexxia.net@toip3.srvr.bell.ca> for <8219@debbugs.gnu.org>; Fri, 11 Mar 2011 18:19:26 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAIY7ek1GHsU+/2dsb2JhbACmN3jCRYViBIUp Received: from bas1-montreal07-1176421694.dsl.bell.ca (HELO ceviche.home) ([70.30.197.62]) by toip3.srvr.bell.ca with ESMTP; 11 Mar 2011 18:19:26 -0500 Received: by ceviche.home (Postfix, from userid 20848) id C8E49660C9; Fri, 11 Mar 2011 18:19:25 -0500 (EST) From: Stefan Monnier Message-ID: References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> Date: Fri, 11 Mar 2011 18:19:25 -0500 In-Reply-To: <838vwlto85.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Mar 2011 22:07:54 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.0 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.0 (--) > This makes a lot of sense, but your description seems to point out > that the implementation does not behave according to the docs: if > markers are (or should be) relocated in sync as result of insertion > and deletion, the same should happen with PT, BUF_BEGV, etc. Actually, indirect buffers keep their point and narrowing in real markers. So when they get "active" the BUF_PT, BUF_ZV, etc... get updated, but until that time, BUF_PT and friends may hold invalid data. I.e. any place where we use BUF_PT on something else than current_buffer, we have a bug waiting to happen unless we know for sure that that buffer is not indirect. Stefan From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Mar 2011 08:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: 8219@debbugs.gnu.org, emacs-devel@gnu.org Reply-To: Eli Zaretskii Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.129991771713680 (code B ref 8219); Sat, 12 Mar 2011 08:16:02 +0000 Received: (at 8219) by debbugs.gnu.org; 12 Mar 2011 08:15:17 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyJym-0003Yb-NK for submit@debbugs.gnu.org; Sat, 12 Mar 2011 03:15:17 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyJyk-0003YO-PJ for 8219@debbugs.gnu.org; Sat, 12 Mar 2011 03:15:15 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LHX00M00QPJTJ00@a-mtaout20.012.net.il> for 8219@debbugs.gnu.org; Sat, 12 Mar 2011 10:15:06 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.58.59]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LHX00M0HQX0KF50@a-mtaout20.012.net.il>; Sat, 12 Mar 2011 10:15:01 +0200 (IST) Date: Sat, 12 Mar 2011 10:15:05 +0200 From: Eli Zaretskii In-reply-to: <874o79nzla.fsf@stupidchicken.com> X-012-Sender: halo1@inter.net.il Message-id: <834o78u54m.fsf@gnu.org> References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <874o79nzla.fsf@stupidchicken.com> X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.1 (--) > From: Chong Yidong > Cc: 8219@debbugs.gnu.org, emacs-devel@gnu.org > Date: Fri, 11 Mar 2011 15:58:57 -0500 > > Eli Zaretskii writes: > > >> Hence, in the aftermath of a deletion, buffer B's values of PT (and > >> BUF_BEGV and BUF_ZV) can be larger than BUF_ZV. > > > > Isn't that a bug, right there? Why doesn't del_range_2 update the > > indirect buffer (B) as well, when deletion removes text so that its PT > > becomes invalid? > > This is not currently easy. We don't keep track of indirect buffers > (looping over the buffer list each time we do a deletion would be rather > inefficient), so this would need some new members of the buffer struct. We could do that lazily, whenever something (including redisplay) is done on a buffer that happens to be an indirect buffer. From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Mar 2011 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: cyd@stupidchicken.com, 8219@debbugs.gnu.org, emacs-devel@gnu.org Reply-To: Eli Zaretskii Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.129992051018287 (code B ref 8219); Sat, 12 Mar 2011 09:02:02 +0000 Received: (at 8219) by debbugs.gnu.org; 12 Mar 2011 09:01:50 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyKhp-0004ku-Vp for submit@debbugs.gnu.org; Sat, 12 Mar 2011 04:01:50 -0500 Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyKhn-0004kg-4D for 8219@debbugs.gnu.org; Sat, 12 Mar 2011 04:01:48 -0500 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0LHX00400SW7NH00@a-mtaout23.012.net.il> for 8219@debbugs.gnu.org; Sat, 12 Mar 2011 11:01:41 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.58.59]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LHX004QDT2RN210@a-mtaout23.012.net.il>; Sat, 12 Mar 2011 11:01:41 +0200 (IST) Date: Sat, 12 Mar 2011 11:01:45 +0200 From: Eli Zaretskii In-reply-to: X-012-Sender: halo1@inter.net.il Message-id: <83wrk4soee.fsf@gnu.org> References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> X-Spam-Score: -1.7 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -1.7 (-) > From: Stefan Monnier > Cc: Chong Yidong , 8219@debbugs.gnu.org, emacs-devel@gnu.org > Date: Fri, 11 Mar 2011 18:19:25 -0500 > > I.e. any place where we use BUF_PT on something else than > current_buffer, we have a bug waiting to happen unless we know for sure > that that buffer is not indirect. It follows that BUF_PT, when used on other than the current buffer should update PT if necessary, if that buffer is an indirect buffer, before returning the value. And the same with BUF_BEGV, BUF_ZV, etc. Right? From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Mar 2011 20:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: cyd@stupidchicken.com, 8219@debbugs.gnu.org, emacs-devel@gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.129996283416312 (code B ref 8219); Sat, 12 Mar 2011 20:48:02 +0000 Received: (at 8219) by debbugs.gnu.org; 12 Mar 2011 20:47:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyViU-0004F2-Lk for submit@debbugs.gnu.org; Sat, 12 Mar 2011 15:47:14 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyViR-0004Ep-Rl for 8219@debbugs.gnu.org; Sat, 12 Mar 2011 15:47:12 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAM9qe03O+IG+/2dsb2JhbACmQnjAGoViBIUrkCE X-IronPort-AV: E=Sophos;i="4.62,308,1297054800"; d="scan'208";a="96051585" Received: from 206-248-129-190.dsl.teksavvy.com (HELO pastel.home) ([206.248.129.190]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 12 Mar 2011 15:47:06 -0500 Received: by pastel.home (Postfix, from userid 20848) id D9E1259047; Sat, 12 Mar 2011 15:47:05 -0500 (EST) From: Stefan Monnier Message-ID: References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <83wrk4soee.fsf@gnu.org> Date: Sat, 12 Mar 2011 15:47:05 -0500 In-Reply-To: <83wrk4soee.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 12 Mar 2011 11:01:45 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.1 (--) > It follows that BUF_PT, when used on other than the current buffer > should update PT if necessary, if that buffer is an indirect buffer, > before returning the value. And the same with BUF_BEGV, BUF_ZV, etc. > Right? Yes. At least that was my conclusion last time we bumped into such a bug. I even added a comment in buffer.h about it: /* !!!FIXME: all the BUF_BEGV/BUF_ZV/BUF_PT macros are flawed: on indirect (or base) buffers, that value is only correct if that buffer is the current_buffer, or if the buffer's text hasn't been modified (via an indirect buffer) since it was last current. */ Stefan From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Mar 2011 16:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Eli Zaretskii , 8219@debbugs.gnu.org, emacs-devel@gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.130003386723621 (code B ref 8219); Sun, 13 Mar 2011 16:32:02 +0000 Received: (at 8219) by debbugs.gnu.org; 13 Mar 2011 16:31:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyoCA-00068u-OZ for submit@debbugs.gnu.org; Sun, 13 Mar 2011 12:31:07 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PyoC9-00068R-10 for 8219@debbugs.gnu.org; Sun, 13 Mar 2011 12:31:05 -0400 Received: from cyd by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1PyoC3-0005lc-Gn; Sun, 13 Mar 2011 12:30:59 -0400 From: Chong Yidong References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <83wrk4soee.fsf@gnu.org> Date: Sun, 13 Mar 2011 12:30:59 -0400 In-Reply-To: (Stefan Monnier's message of "Sat, 12 Mar 2011 15:47:05 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.6 (------) Stefan Monnier writes: > Yes. At least that was my conclusion last time we bumped into such > a bug. I even added a comment in buffer.h about it: > > /* !!!FIXME: all the BUF_BEGV/BUF_ZV/BUF_PT macros are flawed: > on indirect (or base) buffers, that value is only correct if that buffer > is the current_buffer, or if the buffer's text hasn't been modified (via > an indirect buffer) since it was last current. */ I think we should do away with the BUF_BEGV and related macros. Let the code in buffer.c manipulate the buffer->begv members directly; and the usage in other parts of Emacs can be replaced with buf_begv() functions that will update begv if necessary, and return the corrected result. From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Mar 2011 17:10:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Eli Zaretskii , 8219@debbugs.gnu.org, emacs-devel@gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.130003619327147 (code B ref 8219); Sun, 13 Mar 2011 17:10:03 +0000 Received: (at 8219) by debbugs.gnu.org; 13 Mar 2011 17:09:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pyong-00073o-Kh for submit@debbugs.gnu.org; Sun, 13 Mar 2011 13:09:52 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pyonf-00073d-3K for 8219@debbugs.gnu.org; Sun, 13 Mar 2011 13:09:51 -0400 Received: from cyd by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1PyonZ-0007S2-Hc; Sun, 13 Mar 2011 13:09:45 -0400 From: Chong Yidong References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <83wrk4soee.fsf@gnu.org> Date: Sun, 13 Mar 2011 13:09:45 -0400 In-Reply-To: (Chong Yidong's message of "Sun, 13 Mar 2011 12:30:59 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.6 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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.6 (------) Chong Yidong writes: > I think we should do away with the BUF_BEGV and related macros. Let the > code in buffer.c manipulate the buffer->begv members directly; and the > usage in other parts of Emacs can be replaced with buf_begv() functions > that will update begv if necessary, and return the corrected result. Or rather, these functions should consult the pt_marker, begv_marker and zv_marker markers instead of accessing begv etc directly. From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Mar 2011 22:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Stefan Monnier Cc: Eli Zaretskii , 8219@debbugs.gnu.org, emacs-devel@gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.130005534821770 (code B ref 8219); Sun, 13 Mar 2011 22:30:03 +0000 Received: (at 8219) by debbugs.gnu.org; 13 Mar 2011 22:29:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pytmd-0005f4-V4 for submit@debbugs.gnu.org; Sun, 13 Mar 2011 18:29:08 -0400 Received: from vm-emlprdomr-03.its.yale.edu ([130.132.50.144]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pytmc-0005ec-Ep for 8219@debbugs.gnu.org; Sun, 13 Mar 2011 18:29:06 -0400 Received: from furball ([64.134.240.221]) (authenticated bits=0) by vm-emlprdomr-03.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2DMT0O8009193 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 13 Mar 2011 18:29:00 -0400 Received: by furball (Postfix, from userid 1000) id EC45516066A; Sun, 13 Mar 2011 18:29:01 -0400 (EDT) From: Chong Yidong References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <83wrk4soee.fsf@gnu.org> Date: Sun, 13 Mar 2011 18:29:01 -0400 In-Reply-To: (Stefan Monnier's message of "Sat, 12 Mar 2011 15:47:05 -0500") Message-ID: <87wrk2vemq.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.144 X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.6 (--) Stefan Monnier writes: > /* !!!FIXME: all the BUF_BEGV/BUF_ZV/BUF_PT macros are flawed: > on indirect (or base) buffers, that value is only correct if that buffer > is the current_buffer, or if the buffer's text hasn't been modified (via > an indirect buffer) since it was last current. */ OK, I've committed a fix to trunk. Instead of doing away with the BUF_* macros, I reworked them to handle the indirect buffer case properly. This means they can no longer be used in `BUF_PT (foo) = bar' assignment statements, so I've changed the callers that used them this way. Not sure if the patch is appropriate for the emacs-23 branch, though. From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Mar 2011 02:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Chong Yidong Cc: 8219@debbugs.gnu.org, Stefan Monnier , emacs-devel@gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.130007054810678 (code B ref 8219); Mon, 14 Mar 2011 02:43:02 +0000 Received: (at 8219) by debbugs.gnu.org; 14 Mar 2011 02:42:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pyxjo-0002mA-9W for submit@debbugs.gnu.org; Sun, 13 Mar 2011 22:42:28 -0400 Received: from mail-qw0-f44.google.com ([209.85.216.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pyxjm-0002ly-Mk for 8219@debbugs.gnu.org; Sun, 13 Mar 2011 22:42:27 -0400 Received: by qwg5 with SMTP id 5so928658qwg.3 for <8219@debbugs.gnu.org>; Sun, 13 Mar 2011 19:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=EwFvxAaZIvo2pt5pJzJas+l2XlTYE69H5vzt2Wjany8=; b=YgkPf4FefTIK+mfoyupKZe5LwXzjL3XWQAn4qTQyoRXKr3W44xWV00UBnMlB91fjPZ 2Y+6y4eWvK7UbPl8QsCsqCLsXgPiwOvtI8AjKMIo++LMt09FjlTMgfFur0IecNGrBpHj +Tg6bUYAdbfI1SrzH1NSKjNd4ziw++QJ6R5OA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=A7XPwuid/szXTeD1kizAX4D2iLc0U8rHKayL38BmpwuAVhMpaoDN1t5WMG9MmeTwTT auLlVzfYN8SN2c7fqfcrA9tvvcZaz4T1EoCEPOe3UIvsaVkcDnEBvUBfi59Ve5qXIZlT /NacAz8eVWIVjHFaoy4t/IBq8cosowim3D+Ps= Received: by 10.229.10.12 with SMTP id n12mr721258qcn.219.1300070541122; Sun, 13 Mar 2011 19:42:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.74.212 with HTTP; Sun, 13 Mar 2011 19:41:41 -0700 (PDT) In-Reply-To: <87wrk2vemq.fsf@stupidchicken.com> References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <83wrk4soee.fsf@gnu.org> <87wrk2vemq.fsf@stupidchicken.com> From: Juanma Barranquero Date: Mon, 14 Mar 2011 03:41:41 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -3.2 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -3.2 (---) > OK, I've committed a fix to trunk. =C2=A0Instead of doing away with the B= UF_* > macros, I reworked them to handle the indirect buffer case properly. > This means they can no longer be used in `BUF_PT (foo) =3D bar' assignmen= t > statements, so I've changed the callers that used them this way. emacs -Q --eval '(clone-indirect-buffer "clone" nil)' buffer.c:614: Emacs fatal error: assertion failed: NILP (BVAR (b, begv_mark= er)) Breakpoint 1, w32_abort () at w32fns.c:7208 7208 button =3D MessageBox (NULL, (gdb) bt #0 w32_abort () at w32fns.c:7208 #1 0x01047867 in die (msg=3D0x1590744 "assertion failed: NILP (BVAR (b, begv_marker))", file=3D0x158f518 "buffer.c", line=3D614) at alloc.c:6101 #2 0x010caa80 in Fmake_indirect_buffer (base_buffer=3D52342789, name=3D54741601, clone=3D52303922) at buffer.c:614 #3 0x0103beb5 in Ffuncall (nargs=3D4, args=3D0x88f0c0) at eval.c:2849 #4 0x01142a8c in Fbyte_code (bytestr=3D20838137, vector=3D20838245, maxdepth=3D16) at bytecode.c:689 #5 0x0103cbea in funcall_lambda (fun=3D20838093, nargs=3D2, arg_vector=3D0x88f260) at eval.c:3028 #6 0x0103c620 in apply_lambda (fun=3D20838093, args=3D57330886, eval_flag=3D1) at eval.c:2954 #7 0x0103a2bc in Feval (form=3D57330894) at eval.c:2296 #8 0x0103bd75 in Ffuncall (nargs=3D2, args=3D0x88f4b0) at eval.c:2842 #9 0x01142a8c in Fbyte_code (bytestr=3D20645329, vector=3D20645821, maxdepth=3D40) at bytecode.c:689 #10 0x0103cbea in funcall_lambda (fun=3D20645301, nargs=3D1, arg_vector=3D0x88f704) at eval.c:3028 #11 0x0103c2fc in Ffuncall (nargs=3D2, args=3D0x88f700) at eval.c:2891 #12 0x01142a8c in Fbyte_code (bytestr=3D20627337, vector=3D20628333, maxdepth=3D28) at bytecode.c:689 #13 0x0103cbea in funcall_lambda (fun=3D20627317, nargs=3D0, arg_vector=3D0x88f944) at eval.c:3028 #14 0x0103c2fc in Ffuncall (nargs=3D1, args=3D0x88f940) at eval.c:2891 #15 0x01142a8c in Fbyte_code (bytestr=3D20623889, vector=3D20624101, maxdepth=3D24) at bytecode.c:689 #16 0x0103cbea in funcall_lambda (fun=3D20623869, nargs=3D0, arg_vector=3D0x88faf0) at eval.c:3028 #17 0x0103c620 in apply_lambda (fun=3D20623869, args=3D52303898, eval_flag=3D1) at eval.c:2954 #18 0x0103a2bc in Feval (form=3D52791574) at eval.c:2296 #19 0x0100537b in top_level_2 () at keyboard.c:1138 #20 0x010378f4 in internal_condition_case (bfun=3D0x1005368 , handlers=3D52357530, hfun=3D0x1004e81 ) at eval.c:1408 #21 0x010053ad in top_level_1 (ignore=3D52303898) at keyboard.c:1146 #22 0x01037313 in internal_catch (tag=3D52355626, func=3D0x100537d , arg=3D52303898) at eval.c:1152 #23 0x010052f1 in command_loop () at keyboard.c:1101 #24 0x01004573 in recursive_edit_1 () at keyboard.c:731 #25 0x01004a97 in Frecursive_edit () at keyboard.c:793 #26 0x01002797 in main (argc=3D4, argv=3D0xca2da8) at emacs.c:1684 Lisp Backtrace: "make-indirect-buffer" (0x88f0c4) "clone-indirect-buffer" (0x88f260) "eval" (0x88f4b4) "command-line-1" (0x88f704) "command-line" (0x88f944) "normal-top-level" (0x88faf0) From unknown Mon Jun 23 11:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Mar 2011 16:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Juanma Barranquero Cc: 8219@debbugs.gnu.org, Stefan Monnier , emacs-devel@gnu.org Received: via spool by 8219-submit@debbugs.gnu.org id=B8219.13001195323487 (code B ref 8219); Mon, 14 Mar 2011 16:19:02 +0000 Received: (at 8219) by debbugs.gnu.org; 14 Mar 2011 16:18:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PzATs-0000uB-5M for submit@debbugs.gnu.org; Mon, 14 Mar 2011 12:18:52 -0400 Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PzATp-0000tu-V4 for 8219@debbugs.gnu.org; Mon, 14 Mar 2011 12:18:50 -0400 Received: from furball (dhcp128036014146.central.yale.edu [128.36.14.146]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2EGIijY029869 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 14 Mar 2011 12:18:44 -0400 Received: by furball (Postfix, from userid 1000) id 05B7016066A; Mon, 14 Mar 2011 12:18:43 -0400 (EDT) From: Chong Yidong References: <877hc5bfqy.fsf@stupidchicken.com> <838vwlto85.fsf@gnu.org> <83wrk4soee.fsf@gnu.org> <87wrk2vemq.fsf@stupidchicken.com> Date: Mon, 14 Mar 2011 12:18:43 -0400 In-Reply-To: (Juanma Barranquero's message of "Mon, 14 Mar 2011 03:41:41 +0100") Message-ID: <871v29vfoc.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-Spam-Score: -2.7 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.7 (--) Juanma Barranquero writes: >> OK, I've committed a fix to trunk. =C2=A0Instead of doing away with the = BUF_* >> macros, I reworked them to handle the indirect buffer case properly. >> This means they can no longer be used in `BUF_PT (foo) =3D bar' assignme= nt >> statements, so I've changed the callers that used them this way. > > emacs -Q --eval '(clone-indirect-buffer "clone" nil)' > > buffer.c:614: Emacs fatal error: assertion failed: NILP (BVAR (b, begv_ma= rker)) Thanks for the catch. This should be fixed now. From unknown Mon Jun 23 11:28:12 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Chong Yidong Subject: bug#8219: closed (Re: bug#8219: Effect of deletions on indirect buffers (Bug#8219)) Message-ID: References: <87fwqj5ach.fsf@stupidchicken.com> <87ei6e206u.fsf@stupidchicken.com> X-Gnu-PR-Message: they-closed 8219 X-Gnu-PR-Package: emacs Reply-To: 8219@debbugs.gnu.org Date: Sat, 19 Mar 2011 16:45:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1300553102-10743-1" This is a multi-part message in MIME format... ------------=_1300553102-10743-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #8219: 23.3; Crash in indirect buffer which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 8219@debbugs.gnu.org. --=20 8219: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D8219 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1300553102-10743-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 8219-done) by debbugs.gnu.org; 19 Mar 2011 16:44:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0zGJ-0002mR-58 for submit@debbugs.gnu.org; Sat, 19 Mar 2011 12:44:23 -0400 Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0zGH-0002mG-Pu for 8219-done@debbugs.gnu.org; Sat, 19 Mar 2011 12:44:22 -0400 Received: from furball (c-71-192-165-84.hsd1.ct.comcast.net [71.192.165.84]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2JGiEU1001662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <8219-done@debbugs.gnu.org>; Sat, 19 Mar 2011 12:44:15 -0400 Received: by furball (Postfix, from userid 1000) id 69922160461; Sat, 19 Mar 2011 12:44:14 -0400 (EDT) From: Chong Yidong To: 8219-done@debbugs.gnu.org Subject: Re: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Date: Sat, 19 Mar 2011 12:44:14 -0400 Message-ID: <87fwqj5ach.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8219-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.6 (--) I have backported the trunk fix to the emacs-23 brach (there seems to be no safer complete solutions). Closing Bug#8219 and Bug#1242. ------------=_1300553102-10743-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 10 Mar 2011 20:24:56 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxmPn-0001Ck-AI for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:24:55 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxmPl-0001CX-1c for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:24:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxmPe-0002U2-RY for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:24:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:35416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxmPe-0002Ty-Md for submit@debbugs.gnu.org; Thu, 10 Mar 2011 15:24:46 -0500 Received: from [140.186.70.92] (port=43706 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxmPd-00011s-FR for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2011 15:24:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxmPb-0002T6-Gi for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2011 15:24:45 -0500 Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]:46576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxmPb-0002Sd-Ev for bug-gnu-emacs@gnu.org; Thu, 10 Mar 2011 15:24:43 -0500 Received: from furball (dhcp128036014208.central.yale.edu [128.36.14.208]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2AKOfuk020935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 10 Mar 2011 15:24:41 -0500 Received: by furball (Postfix, from userid 1000) id 87938160401; Thu, 10 Mar 2011 15:24:41 -0500 (EST) From: Chong Yidong To: bug-gnu-emacs@gnu.org Subject: 23.3; Crash in indirect buffer Date: Thu, 10 Mar 2011 15:24:41 -0500 Message-ID: <87ei6e206u.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -4.7 (----) Just came across this; it is present in (at least) 23.2, and in trunk. I haven't had time to debug further; any help welcome. The backtrace is from trunk. emacs -Q M-< M-x clone-indirect-buffer RET C-n C-k C-x o C-k => abort #0 abort () at emacs.c:372 #1 0x0000000000646ba0 in find_interval (tree=0xc569e0, position=78) at intervals.c:635 #2 0x0000000000649c9c in get_property_and_range (pos=78, prop=12679682, val=0x7fffffffacd8, start=0x7ffffffface8, end=0x7ffffffface0, object=22411973) at intervals.c:2263 #3 0x0000000000651631 in find_composition (pos=78, limit=-1, start=0x7ffffffface8, end=0x7ffffffface0, prop=0x7fffffffacd8, object=22411973) at composite.c:430 #4 0x0000000000448290 in check_point_in_composition (prev_buf=0x155fac0, prev_pt=78, buf=0x155fac0, pt=2) at xdisp.c:11311 #5 0x0000000000448857 in reconsider_clip_changes (w=0x1564480, b=0x155fac0) at xdisp.c:11358 #6 0x000000000044f0d7 in redisplay_window (window=22430853, just_this_one_p=0) at xdisp.c:13715 #7 0x000000000044addc in redisplay_window_0 (window=22430853) at xdisp.c:12362 #8 0x00000000005dc1dc in internal_condition_case_1 ( bfun=0x44ad9d , arg=22430853, handlers=12412566, hfun=0x44ad6e ) at eval.c:1453 #9 0x000000000044ad4f in redisplay_windows (window=22430853) at xdisp.c:12342 #10 0x000000000044ad09 in redisplay_windows (window=22430309) at xdisp.c:12336 #11 0x0000000000449e14 in redisplay_internal (preserve_echo_area=0) at xdisp.c:11919 #12 0x0000000000447cff in redisplay () at xdisp.c:11139 #13 0x00000000005419ca in read_char (commandflag=1, nmaps=2, maps=0x7fffffffdae0, prev_event=12442194, used_mouse_menu=0x7fffffffddb8, end_time=0x0) at keyboard.c:2357 #14 0x000000000054f450 in read_key_sequence (keybuf=0x7fffffffde20, bufsize=30, prompt=12442194, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9193 #15 0x000000000053fbae in command_loop_1 () at keyboard.c:1409 #16 0x00000000005dc067 in internal_condition_case ( bfun=0x53f7f3 , handlers=12494210, hfun=0x53f0d8 ) at eval.c:1408 #17 0x000000000053f4f4 in command_loop_2 (ignore=12442194) at keyboard.c:1129 #18 0x00000000005dba31 in internal_catch (tag=12490226, func=0x53f4ce , arg=12442194) at eval.c:1152 #19 0x000000000053f4a7 in command_loop () at keyboard.c:1108 #20 0x000000000053ec0f in recursive_edit_1 () at keyboard.c:731 #21 0x000000000053edc2 in Frecursive_edit () at keyboard.c:793 #22 0x000000000053d0e8 in main (argc=2, argv=0x7fffffffe728) at emacs.c:1684 In GNU Emacs 24.0.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.20.1) of 2011-03-10 on furball Windowing system distributor `The X.Org Foundation', version 11.0.10706000 configured using `configure 'CC=gcc' 'CFLAGS=-g'' ------------=_1300553102-10743-1-- From unknown Mon Jun 23 11:28:12 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Eric Hanchrow Subject: bug#1242: closed (Re: bug#8219: Effect of deletions on indirect buffers (Bug#8219)) Message-ID: References: <87fwqj5ach.fsf@stupidchicken.com> <87vdvhizbr.fsf@offby1.atm01.sea.blarg.net> X-Gnu-PR-Message: they-closed 1242 X-Gnu-PR-Package: emacs Reply-To: 1242@debbugs.gnu.org Date: Sat, 19 Mar 2011 16:45:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1300553103-10743-3" This is a multi-part message in MIME format... ------------=_1300553103-10743-3 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #8219: 23.0.60; aborted soon after I cloned a buffer which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 1242@debbugs.gnu.org. --=20 8219: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D8219 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1300553103-10743-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 8219-done) by debbugs.gnu.org; 19 Mar 2011 16:44:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0zGJ-0002mR-58 for submit@debbugs.gnu.org; Sat, 19 Mar 2011 12:44:23 -0400 Received: from vm-emlprdomr-04.its.yale.edu ([130.132.50.145]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0zGH-0002mG-Pu for 8219-done@debbugs.gnu.org; Sat, 19 Mar 2011 12:44:22 -0400 Received: from furball (c-71-192-165-84.hsd1.ct.comcast.net [71.192.165.84]) (authenticated bits=0) by vm-emlprdomr-04.its.yale.edu (8.14.4/8.14.4) with ESMTP id p2JGiEU1001662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <8219-done@debbugs.gnu.org>; Sat, 19 Mar 2011 12:44:15 -0400 Received: by furball (Postfix, from userid 1000) id 69922160461; Sat, 19 Mar 2011 12:44:14 -0400 (EDT) From: Chong Yidong To: 8219-done@debbugs.gnu.org Subject: Re: bug#8219: Effect of deletions on indirect buffers (Bug#8219) Date: Sat, 19 Mar 2011 12:44:14 -0400 Message-ID: <87fwqj5ach.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.145 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8219-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 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: -2.6 (--) I have backported the trunk fix to the emacs-23 brach (there seems to be no safer complete solutions). Closing Bug#8219 and Bug#1242. ------------=_1300553103-10743-3 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From offby1@blarg.net Fri Oct 24 12:11:05 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.5 required=4.0 tests=AWL,BAYES_00,FOURLA, IMPRONONCABLE_2,RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 24 Oct 2008 19:11:05 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9OJB0fU027490 for ; Fri, 24 Oct 2008 12:11:02 -0700 Received: from mail.gnu.org ([199.232.76.166]:59577 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KtS1A-0003p2-Fn for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 15:08:16 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KtS3m-0001C5-6x for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 15:10:59 -0400 Received: from smtp61.avvanta.com ([206.124.128.61]:36092 helo=mail.avvanta.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KtS3l-00015d-Kp for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 15:10:58 -0400 Received: from mail.avvanta.com (localhost.drteeth.p.blarg.net [127.0.0.1]) by mail.avvanta.com (Postfix) with ESMTP id 5C861F3950 for ; Fri, 24 Oct 2008 12:10:33 -0700 (PDT) Received: from offby1.atm01.sea.blarg.net (q-static-138-125.avvanta.com [206.124.138.125]) by mail.avvanta.com (Postfix) with ESMTP id 22F91F393D for ; Fri, 24 Oct 2008 12:10:33 -0700 (PDT) Received: from erich by offby1.atm01.sea.blarg.net with local (Exim 4.69) (envelope-from ) id 1KtS3M-0003Z9-8P for emacs-pretest-bug@gnu.org; Fri, 24 Oct 2008 12:10:32 -0700 From: Eric Hanchrow To: emacs-pretest-bug@gnu.org Subject: 23.0.60; aborted soon after I cloned a buffer Date: Fri, 24 Oct 2008 12:10:32 -0700 Message-ID: <87vdvhizbr.fsf@offby1.atm01.sea.blarg.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BlargAV-Status: No viruses detected, BlargAV v1.1 on localhost.drteeth.p.blarg.net X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: I was editing a file, and hit C-x 4 c to clone the buffer -- I then narrowed one window to one region, and narrowed the other window (in the cloned buffer) to some other region. (I do this occasionally because I want to focus on _two_ separate pieces of the file at once, while ignoring everything else.) I did some editing -- can't remember what, unfortunately -- for a few minutes, and suddenly emacs broke into the debugger: SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] Environment variable "DISPLAY" not defined. TERM = screen Breakpoint 1 at 0x81155f6: file emacs.c, line 424. Breakpoint 2 at 0x812fba9: file sysdep.c, line 1135. Starting program: /usr/local/src/emacs-via-git/src/emacs -nw [Thread debugging using libthread_db enabled] [New Thread 0xb7025720 (LWP 1708)] [Switching to Thread 0xb7025720 (LWP 1708)] Program exited normally. quit SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] Environment variable "DISPLAY" not defined. TERM = screen Breakpoint 1 at 0x8115676: file emacs.c, line 424. Breakpoint 2 at 0x812fc39: file sysdep.c, line 1130. Starting program: /usr/local/src/emacs-via-git/src/emacs -nw [Thread debugging using libthread_db enabled] [New Thread 0xb70e4720 (LWP 20702)] [Switching to Thread 0xb70e4720 (LWP 20702)] SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] Environment variable "DISPLAY" not defined. TERM = screen Breakpoint 1 at 0x8115676: file emacs.c, line 424. Breakpoint 2 at 0x812fc39: file sysdep.c, line 1130. Starting program: /usr/local/src/emacs-via-git/src/emacs -nw [Thread debugging using libthread_db enabled] [New Thread 0xb70c7720 (LWP 13123)] [Switching to Thread 0xb70c7720 (LWP 13123)] Program exited normally. Working directory /usr/local/src/emacs-via-git. quit SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] Environment variable "DISPLAY" not defined. TERM = screen Breakpoint 1 at 0x81184f6: file emacs.c, line 424. Breakpoint 2 at 0x8132ab9: file sysdep.c, line 1130. Starting program: /usr/local/src/emacs-via-git/src/emacs -nw [Thread debugging using libthread_db enabled] [New Thread 0xb7074720 (LWP 12451)] [Switching to Thread 0xb7074720 (LWP 12451)] Breakpoint 1, abort () at emacs.c:424 424 kill (getpid (), SIGABRT); #0 abort () at emacs.c:424 #1 0x081cb447 in find_interval (tree=0x9360194, position=3149) at intervals.c:658 #2 0x081cbf16 in get_property_and_range (pos=3149, prop=138091297, val=0xbf842340, start=0xbf842348, end=0xbf842344, object=161440276) at intervals.c:2314 #3 0x081d3e02 in find_composition (pos=3149, limit=-1, start=0xbf842348, end=0xbf842344, prop=0xbf842340, object=161440276) at composite.c:430 #4 0x080770ee in check_point_in_composition (prev_buf=0x99f6210, prev_pt=3149, buf=0x99f6210, pt=3037) at xdisp.c:11189 #5 0x0807737d in reconsider_clip_changes (w=0x9d2dd20, b=0x99f6210) at xdisp.c:11236 #6 0x0808a946 in redisplay_window (window=164814116, just_this_one_p=0) at xdisp.c:13263 #7 0x0808d7e3 in redisplay_window_0 (window=164814116) at xdisp.c:12255 #8 0x08181c66 in internal_condition_case_1 (bfun=0x808d7c0 , arg=164814116, handlers=137857429, hfun=0x8068c20 ) at eval.c:1559 #9 0x08078d86 in redisplay_windows (window=161440272) at xdisp.c:12234 #10 0x08078d3a in redisplay_windows (window=161440272) at xdisp.c:12228 #11 0x0808e28e in redisplay_internal (preserve_echo_area=) at xdisp.c:11810 #12 0x081254e6 in read_char (commandflag=1, nmaps=5, maps=0xbf843f90, prev_event=137870617, used_mouse_menu=0xbf844030, end_time=0x0) at keyboard.c:2649 #13 0x081275cf in read_key_sequence (keybuf=0xbf8440d4, bufsize=30, prompt=137870617, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9343 #14 0x08129597 in command_loop_1 () at keyboard.c:1621 #15 0x08181e90 in internal_condition_case (bfun=0x81293f0 , handlers=137913825, hfun=0x8124330 ) at eval.c:1511 #16 0x08123883 in command_loop_2 () at keyboard.c:1338 #17 0x08181f6a in internal_catch (tag=137909801, func=0x8123860 , arg=137870617) at eval.c:1247 #18 0x08124197 in command_loop () at keyboard.c:1317 #19 0x0812450b in recursive_edit_1 () at keyboard.c:942 #20 0x08124641 in Frecursive_edit () at keyboard.c:1004 #21 0x0811930c in main (argc=2, argv=0xbf844754) at emacs.c:1723 quit The program is running. Exit anyway? (y or n) If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/local/src/emacs-via-git/etc/DEBUG for instructions. In GNU Emacs 23.0.60.3 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-10-15 on debian configured using `configure '-C' '--enable-maintainer-mode'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: Group Minor modes in effect: gnus-topic-mode: t gnus-undo-mode: t erc-autojoin-mode: t erc-match-mode: t erc-log-mode: t erc-services-mode: t erc-networks-mode: t desktop-save-mode: t recentf-mode: t display-time-mode: t global-auto-revert-mode: t diff-auto-refine-mode: t shell-dirtrack-mode: t iswitchb-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-l q RET C-e C-a c y c y , RET c y l RET RET q l RET c y l RET C-d x RET n n C-n RET q q l RET c y l RET c y l RET C-d q C-d RET SPC q q RET x C-n C-n C-e C-n C-n C-n C-n C-n C-n C-n C-n c y l RET x c y l z C-x b g r o RET g n n n RET RET SPC DEL C-x o C-u C-n C-u C-n C-n C-f C-@ C-e C-b C-b ESC w m C-y C-c C-c u n s u b RET C-x o B DEL y e s RET q c y , RET q l RET RET SPC SPC SPC SPC SPC SPC SPC SPC c y l RET x c y l z C-x b g r o RET m m e SPC C-n S e r i o u s SPC f u l l - b l o w n SPC t e s t ! C-u C-n T h i s SPC T o DEL i m e SPC F e r SPC S h i r ! ! C-c C-c g n n n RET C-n C-n RET n n SPC SPC SPC SPC C-n C-n RET C-x h B DEL y e s RET q , RET C-d q q RET q RET C-d x q q RET C-k x c y x l RET c y l RET B DEL y e s RET q c y z C-x b g r o RET g RET RET SPC B DEL y e s RET q , RET x RET SPC q ESC x r e p o r t - e m TAB RE T Recent messages: Fetching headers for nntp+localhost:gmane.emacs.devel...done Scoring...done Sorting threads...done Generating summary...done Sorting threads...done Generating summary...done Auto-saving...done Exiting summary buffer and applying spam rules No more unread newsgroups Auto-saving... -- ... a physicist of my acquaintance confiscated my copies of The Tao of Physics and The Dancing Wu-li Masters and wouldn't let me have them back even when I threatened to sue. -- Megan McArdle (writing as "Jane Galt") ------------=_1300553103-10743-3--