From unknown Fri Jun 20 07:10:29 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#716 <716@debbugs.gnu.org> To: bug#716 <716@debbugs.gnu.org> Subject: Status: 23.0.60; opening tgz file causes emacs crash Reply-To: bug#716 <716@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:10:29 +0000 retitle 716 23.0.60; opening tgz file causes emacs crash reassign 716 emacs,w32 submitter 716 robert marshall severity 716 grave thanks From robert.marshall@tnei.co.uk Thu Aug 14 02:07:57 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.7 required=4.0 tests=AWL,BAYES_00,FOURLA, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 14 Aug 2008 09:07:57 +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 m7E97r3d020336 for ; Thu, 14 Aug 2008 02:07:54 -0700 Received: from mx10.gnu.org ([199.232.76.166]:37065) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1KTYn2-0000XH-FO for emacs-pretest-bug@gnu.org; Thu, 14 Aug 2008 05:06:40 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1KTYo5-0002Ln-5I for emacs-pretest-bug@gnu.org; Thu, 14 Aug 2008 05:07:51 -0400 Received: from probity.mcc.ac.uk ([130.88.200.94]:56462) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KTYo4-0002Jb-AN for emacs-pretest-bug@gnu.org; Thu, 14 Aug 2008 05:07:44 -0400 Received: from ipsa-gw.capcis.umist.ac.uk ([130.88.144.65] helo=[130.88.108.14]) by probity.mcc.ac.uk with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KTYny-000AOl-6q for emacs-pretest-bug@gnu.org; Thu, 14 Aug 2008 10:07:38 +0100 Message-ID: <48A3E7C9.8050509@tnei.co.uk> Date: Thu, 14 Aug 2008 09:07:37 +0100 From: robert marshall User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: emacs-pretest-bug@gnu.org Subject: 23.0.60; opening tgz file causes emacs crash Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-UoM: Scanned by the University Mail System. See http://www.itservices.manchester.ac.uk/email/filtering/information/ for details. X-detected-kernel: by monty-python.gnu.org: FreeBSD 6.x (1) If I open a tgz (tar and gzipped file) in emacs it immediately crashes (giving the windows emacs abort dialog) The file I used to test this was http://download.savannah.gnu.org/releases/viewmail/vm-8.0.11-581.tgz but the problem seemed to occur for other tgz files 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 c:/tmp/emacs/etc/DEBUG for instructions. In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) of 2008-08-01 on LENNART-69DE564 Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' 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: ENG value of $XMODIFIERS: nil locale-coding-system: cp1252 default-enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: recentf-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t From jasonr@gnu.org Thu Aug 14 17:41:51 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=-2.9 required=4.0 tests=AWL,BAYES_00, MURPHY_DRUGS_REL8,SPF_HELO_PASS,VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 15 Aug 2008 00:41:52 +0000 Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7F0fmZ9020032 for ; Thu, 14 Aug 2008 17:41:49 -0700 X-Trace: 69472409/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130 X-SBRS: None X-RemoteIP: 61.4.103.130 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoUBAPRtpEg9BGeC/2dsb2JhbAAItgiBVQ X-IronPort-AV: E=Sophos;i="4.32,212,1217804400"; d="scan'208";a="69472409" X-IP-Direction: OUT Received: from unknown (HELO [10.1.1.112]) ([61.4.103.130]) by smtp.f2s.tiscali.co.uk with ESMTP; 15 Aug 2008 01:41:41 +0100 Message-ID: <48A4D098.4040505@gnu.org> Date: Fri, 15 Aug 2008 08:40:56 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: Mark W32 bugs Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit reassign 689 emacs,w32 reassign 716 emacs,w32 reassign 720 emacs,w32 tags 720 patch reassign 722 emacs,w32 thanks From jasonrumney@gmail.com Fri Aug 22 05:11:46 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=-5.9 required=4.0 tests=BAYES_00,FOURLA, HAS_BUG_NUMBER,IMPRONONCABLE_2 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 22 Aug 2008 12:11:47 +0000 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.184]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7MCBXWC016251 for <716@emacsbugs.donarmstrong.com>; Fri, 22 Aug 2008 05:11:41 -0700 Received: by ti-out-0910.google.com with SMTP id b6so290885tic.1 for <716@emacsbugs.donarmstrong.com>; Fri, 22 Aug 2008 05:11:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding:from; bh=sKJXyoK37vvmUEUYQXZvb+S3O/aXqNvFDvwx5MPYSKU=; b=SZKYP/7Pk7Hq9AO8gRb3XfODCUPxv7rdSOIfOyfI6CyD3vDcIvy4J3vHQtX2YNVYEt serqHs3XEa4OJtyDFpTkLFWyM/Xt9FL69pIsH8eyi4ai29uiCLP1g5wWoLL9sUGsq7Hq 4mNYnjvoLfjW29a6Bbb5ugyU54Klu8kbX376I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding:from; b=aql1l8HuqzLkdzbwTRKR0Vjzu+nhJ7qV8/eVfo1I1agXtVA/oju+wNMNeJl7TsSN9I +0yvWNSTBzh4ea1a2bxYrNc8JTlpS+SIx4RxUf82rDgLEvQJ+4I1EiHl88IhZAV7SPEm GCrGPV8yNyhQhmFyU7O/KccSBGEN8YWS7+U68= Received: by 10.110.39.20 with SMTP id m20mr1177811tim.41.1219407092778; Fri, 22 Aug 2008 05:11:32 -0700 (PDT) Received: from ?172.16.0.12? ( [124.82.236.150]) by mx.google.com with ESMTPS id a14sm3098349tia.0.2008.08.22.05.11.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 22 Aug 2008 05:11:31 -0700 (PDT) Message-ID: <48AEACC4.2000300@gnu.org> Date: Fri, 22 Aug 2008 20:10:44 +0800 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: robert marshall , 716@debbugs.gnu.org Subject: Re: bug#716: 23.0.60; opening tgz file causes emacs crash References: <48A3E7C9.8050509@tnei.co.uk> In-Reply-To: <48A3E7C9.8050509@tnei.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Jason Rumney robert marshall wrote: > If I open a tgz (tar and gzipped file) in emacs it immediately crashes > (giving the windows emacs abort dialog) In trying to debug this, I think I have found where it is going wrong, but I have no idea why and how to debug the relevant bytecode. It could be a sign of the byte compilation going wrong on Windows (line-end or other coding problems?), or a bug in Fbytecode somewhere (which is only affecting Windows for some reason). The stack trace when debugging includes the following: #8 0x010a5e65 in Finsert (nargs=2, args=0x0) at editfns.c:2224 #9 0x0115795b in Fbyte_code (bytestr=48986435, vector=49414916, maxdepth=48) at bytecode.c:1265 #10 0x01023232 in funcall_lambda (fun=49839780, nargs=0, arg_vector=0x82d854) at eval.c:3229 #11 0x01022d11 in Ffuncall (nargs=1, args=0x82d850) at eval.c:3088 In frame #11, args[0] is tar-summarize-buffer, so at that point all appears normal. By frame #8 things have clearly gone wrong. How did args become a NULL pointer, yet there are 2 args? Currently I don't have access to a GNU/Linux machine to try a copy of tar-mode.elc compiled there. Can someone else with access to both platforms try that? To reproduce the bug, you need to open a tar file in Emacs (trunk) maybe a few times (the most I have had to open one before triggering the bug is 3 times, but often it happens first time). From jasonr@gnu.org Fri Aug 22 09:13:40 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=-4.8 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 22 Aug 2008 16:13:40 +0000 Received: from mk-outboundfilter-6-a-2.mail.uk.tiscali.com (mk-outboundfilter-6-a-2.mail.uk.tiscali.com [212.74.114.16]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7MGDaiW028797 for <716@emacsbugs.donarmstrong.com>; Fri, 22 Aug 2008 09:13:37 -0700 X-Trace: 17883975/mk-outboundfilter-6.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.236.150 X-SBRS: None X-RemoteIP: 124.82.236.150 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkoBAPqBrkh8UuyW/2dsb2JhbAAItkyBaA X-IronPort-AV: E=Sophos;i="4.32,252,1217804400"; d="scan'208";a="17883975" X-IP-Direction: OUT Received: from unknown (HELO [172.16.0.12]) ([124.82.236.150]) by smtp.f2s.tiscali.co.uk with ESMTP; 22 Aug 2008 17:13:28 +0100 Message-ID: <48AEE576.4000606@gnu.org> Date: Sat, 23 Aug 2008 00:12:38 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 716@debbugs.gnu.org CC: robert marshall Subject: Re: bug#716: 23.0.60; opening tgz file causes emacs crash References: <48A3E7C9.8050509@tnei.co.uk> <48AEACC4.2000300@gnu.org> In-Reply-To: <48AEACC4.2000300@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jason Rumney wrote: > In trying to debug this, I think I have found where it is going wrong On further investigation, I think I was seeing symptoms of the problem (smashed stack), not the cause. The NULL argument I observed was inconsistent with the next stack frame up, where the same argument was perfectly valid. The problem starts to occur with version 1.126 of lisp/tar-mode.el. This version contained a rewrite to use separate unibyte and multibyte buffers rather than switching between them in the same buffer. I think something is going wrong here - a possible problems is that the buffer where the crash occurs has a buffer-file-coding-system of iso-latin-1-dos, but my tar program outputs unix line ends (checked by redirecting output to a file, and letting Emacs auto-detect line ends in that file). From jasonr@gnu.org Sat Aug 30 01:47:40 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=-5.4 required=4.0 tests=AWL,BAYES_00,SPF_HELO_PASS, VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 30 Aug 2008 08:47:40 +0000 Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m7U8lbrO018901 for ; Sat, 30 Aug 2008 01:47:38 -0700 X-Trace: 76182901/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.236.150 X-SBRS: None X-RemoteIP: 124.82.236.150 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsBACCmuEh8UuyW/2dsb2JhbAAItHmBag X-IronPort-AV: E=Sophos;i="4.32,296,1217804400"; d="scan'208";a="76182901" X-IP-Direction: OUT Received: from unknown (HELO [172.16.0.12]) ([124.82.236.150]) by smtp.f2s.tiscali.co.uk with ESMTP; 30 Aug 2008 09:47:27 +0100 Message-ID: <48B908F1.9040304@gnu.org> Date: Sat, 30 Aug 2008 16:46:41 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: Merge related bugs Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit merge 716 805 From jasonr@f2s.com Mon Sep 1 05:13:22 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=-5.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 1 Sep 2008 12:13:22 +0000 Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m81CDHJp027155 for <716@emacsbugs.donarmstrong.com>; Mon, 1 Sep 2008 05:13:20 -0700 X-Trace: 76910195/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.236.150 X-SBRS: None X-RemoteIP: 124.82.236.150 X-IP-MAIL-FROM: jasonr@f2s.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8BADx4u0h8UuyW/2dsb2JhbAAIsm6BaQ X-IronPort-AV: E=Sophos;i="4.32,307,1217804400"; d="scan'208";a="76910195" X-IP-Direction: OUT Received: from unknown (HELO [172.16.0.12]) ([124.82.236.150]) by smtp.f2s.tiscali.co.uk with ESMTP; 01 Sep 2008 13:13:07 +0100 Message-ID: <48BBDC27.1090601@f2s.com> Date: Mon, 01 Sep 2008 20:12:23 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Jason Rumney , 716@debbugs.gnu.org Subject: Bug in buffer-swap-text (was Re: bug#716: 23.0.60; opening tgz file causes emacs crash) References: <48A3E7C9.8050509@tnei.co.uk> <48AEACC4.2000300@gnu.org> <48AEE576.4000606@gnu.org> In-Reply-To: <48AEE576.4000606@gnu.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I've managed to reduce this to a small test case that shows that the bug is in new function buffer-swap-text. Create the following new buffers: ---- test1.txt ---- This is buffer 1 (buffer-swap-text "test2.txt") ---- test2.txt ---- This is buffer 2 (buffer-swap-text "test2.txt") After creating these buffers, switch to test1.txt buffer and press C-x C-e at the end of the second line. This works fine, and you can swap the two buffers without problem repeatedly. Now, still in test1.txt buffer, C-x RET f binary Now try C-x C-e on the second line again. Perhaps not on the first try, but sooner or later Emacs crashes. From jasonr@gnu.org Mon Sep 1 05:21:43 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=-5.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 1 Sep 2008 12:21:43 +0000 Received: from mk-outboundfilter-3.mail.uk.tiscali.com (mk-outboundfilter-3.mail.uk.tiscali.com [212.74.114.23]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m81CLdDD030278 for <716@emacsbugs.donarmstrong.com>; Mon, 1 Sep 2008 05:21:41 -0700 X-Trace: 164458619/mk-outboundfilter-1.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.236.150 X-SBRS: None X-RemoteIP: 124.82.236.150 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8BAGR6u0h8UuyW/2dsb2JhbAAIsnqBaQ X-IronPort-AV: E=Sophos;i="4.32,307,1217804400"; d="scan'208";a="164458619" X-IP-Direction: OUT Received: from unknown (HELO [172.16.0.12]) ([124.82.236.150]) by smtp.f2s.tiscali.co.uk with ESMTP; 01 Sep 2008 13:20:19 +0100 Message-ID: <48BBDDCE.50602@gnu.org> Date: Mon, 01 Sep 2008 20:19:26 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Jason Rumney , 716@debbugs.gnu.org Subject: Re: Bug in buffer-swap-text (was Re: bug#716: 23.0.60; opening tgz file causes emacs crash) References: <48A3E7C9.8050509@tnei.co.uk> <48AEACC4.2000300@gnu.org> <48AEE576.4000606@gnu.org> <48BBDC27.1090601@f2s.com> In-Reply-To: <48BBDC27.1090601@f2s.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jason Rumney wrote: > (buffer-swap-text "test2.txt") Should be (buffer-swap-text (get-buffer "test2.txt")) I've also found that the crash only happens if buffer-swap-text is called from the binary buffer, and only if the other buffer is not binary. From jasonr@gnu.org Thu Sep 4 16:07:58 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.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 4 Sep 2008 23:07:58 +0000 Received: from mk-outboundfilter-6-a-2.mail.uk.tiscali.com (mk-outboundfilter-6-a-2.mail.uk.tiscali.com [212.74.114.16]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m84N7mDp003587; Thu, 4 Sep 2008 16:07:50 -0700 X-Trace: 23049994/mk-outboundfilter-6.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/124.82.237.250 X-SBRS: None X-RemoteIP: 124.82.237.250 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AocBADIHwEh8Uu36/2dsb2JhbAAIsQqHAYFl X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; d="scan'208";a="23049994" X-IP-Direction: OUT Received: from unknown (HELO [172.16.0.17]) ([124.82.237.250]) by smtp.f2s.tiscali.co.uk with ESMTP; 05 Sep 2008 00:07:41 +0100 Message-ID: <48C06A11.10805@gnu.org> Date: Fri, 05 Sep 2008 07:06:57 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman , 891@debbugs.gnu.org Subject: Re: bug#891: 23.0.60; Emacs aborts after buffer-swap-text References: <871vzzczi2.fsf@escher.local.home> In-Reply-To: <871vzzczi2.fsf@escher.local.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CrossAssassin-Score: 2 merge 891 716 reassign 716 emacs reassign 805 emacs thanks Stephen Berman wrote: > 1. emacs -Q > 2. Load the library tabbar.el, available from > http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup > 3. M-x tabbar-mode > 4. M-: (buffer-swap-text (get-buffer "*Messages*")) > 5. C-c C-right (tabbar-forward) > ==> Emacs aborts > This seems to be the same bug as has been happening with tar-mode on Windows since tar-mode was changed to use buffer-swap-text. So the underlying bug is not platform specific after all. Do you also get crashes when opening tar files in Emacs? > The full backtrace is below. According to the Lisp backtrace, the abort > occurs during or after switch-to-buffer. Yet typing C-x b after step 4 > above does not make Emacs abort. Moreover, when I directly call any of > the tabbar.el functions listed in the backtrace and step through them > with edebug, this also fails to make Emacs abort. Yet the above recipe > is reliably reproducible. > > (Since the abort occurs in unshow_buffer, my guess, based on a comment > at line 8314 of xdisp.c, is that switch-to-buffer needs to have > something like the code in with_echo_area_buffer that changes w->pointm. > I guess this would go after the call to Fset_buffer in switch-to-buffer, > but I don't know how to write the code.) > Can this be done in Fbuffer_swap_text, rather than expecting other code to clean up after the fact? Some of the crashes I've seen while debugging this have not involved switch-to-buffer, so there are probably many other locations where this clean up code needs to go if it can't be done in Fbuffer_swap_text for some reason. From jasonr@gnu.org Thu Sep 4 17:25:48 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=-5.9 required=4.0 tests=AWL,BAYES_00,SPF_HELO_PASS, VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 5 Sep 2008 00:25:48 +0000 Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m850PiO9030893 for ; Thu, 4 Sep 2008 17:25:46 -0700 X-Trace: 78646362/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130 X-SBRS: None X-RemoteIP: 61.4.103.130 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AocBADwZwEg9BGeC/2dsb2JhbAAIgT2vTIcEgWU X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; d="scan'208";a="78646362" X-IP-Direction: OUT Received: from unknown (HELO [10.1.1.113]) ([61.4.103.130]) by smtp.f2s.tiscali.co.uk with ESMTP; 05 Sep 2008 01:25:23 +0100 Message-ID: <48C07C44.8000507@gnu.org> Date: Fri, 05 Sep 2008 08:24:36 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: merge bugs after package changed Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit merge 716 891 From jasonr@gnu.org Fri Sep 5 02:58:29 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.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 5 Sep 2008 09:58:29 +0000 Received: from mk-outboundfilter-5.mail.uk.tiscali.com (mk-outboundfilter-5.mail.uk.tiscali.com [212.74.114.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m859wKcV000443; Fri, 5 Sep 2008 02:58:21 -0700 X-Trace: 78811840/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-INTERNET-ACCEPTED/None/61.4.103.130 X-SBRS: None X-RemoteIP: 61.4.103.130 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkgBAP+fwEg9BGeC/2dsb2JhbAAIsDaGbYFl X-IronPort-AV: E=Sophos;i="4.32,320,1217804400"; d="scan'208";a="78811840" X-IP-Direction: OUT Received: from unknown (HELO [10.1.1.113]) ([61.4.103.130]) by smtp.f2s.tiscali.co.uk with ESMTP; 05 Sep 2008 10:58:12 +0100 Message-ID: <48C10284.7090103@gnu.org> Date: Fri, 05 Sep 2008 17:57:24 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman CC: 891@debbugs.gnu.org Subject: Re: bug#891: 23.0.60; Emacs aborts after buffer-swap-text References: <871vzzczi2.fsf@escher.local.home> <48C06A11.10805@gnu.org> <87hc8vgfhm.fsf@escher.local.home> In-Reply-To: <87hc8vgfhm.fsf@escher.local.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-CrossAssassin-Score: 2 unmerge 891 thanks Stephen Berman wrote: > On Fri, 05 Sep 2008 07:06:57 +0800 Jason Rumney wrote: > >> Stephen Berman wrote: >> >>> 1. emacs -Q >>> 2. Load the library tabbar.el, available from >>> http://emhacks.cvs.sourceforge.net/emhacks/emhacks/tabbar.el?revision=1.69&view=markup >>> 3. M-x tabbar-mode >>> 4. M-: (buffer-swap-text (get-buffer "*Messages*")) >>> 5. C-c C-right (tabbar-forward) >>> ==> Emacs aborts >>> >>> >> This seems to be the same bug as has been happening with tar-mode on Windows >> since tar-mode was changed to use buffer-swap-text. So the underlying bug is >> not platform specific after all. Do you also get crashes when opening tar >> files in Emacs? >> > > No, opening a .tar, .tar.gz, or .tgz file works fine here (before > applying Stefan's patch). I also could not reproduce the crash with > your recipe in the 716 thread. So I guess there are still some platform > specific issues. > Stefan's patch does not help with the tar-mode crashes, so I guess this is a different bug after all. From jasonrumney@gmail.com Sat Sep 6 07:18:29 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=-7.4 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,IMPRONONCABLE_2,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 6 Sep 2008 14:18:29 +0000 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.185]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m86EIPnm006710 for ; Sat, 6 Sep 2008 07:18:26 -0700 Received: by ti-out-0910.google.com with SMTP id b6so543347tic.1 for ; Sat, 06 Sep 2008 07:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding:sender; bh=KWx9fMGjSBwvEtcBZPijDNCsskXs2HmKjTL0QmG50iE=; b=Zh5gumUtJeQnnz+2NsezXVsv3LR7BpP4kUW8Q1i+P8EOAxYvaKu9fwf4zy0BXQXT77 lgf6h/z8bsPgnCCqPpcd0/Ba+wUMkUwFLOVd4aRlHfRkCMDTznXLFb95h47PHtLufgJT fWTzQVu2xw7t/ekxGZb2cXY0A2Col0BekgetM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding:sender; b=fWt3MzwxTi5BrjhcmzEyMBu2xkVo9eHjftbSo70+/eAX1EKZsFDqVV5yhrU3YB2Xv7 kThIoWExA+PXaGQI+VRNdwSQneVttlME+rEXla3OHMj6sBZMk4pRvfsQ7JjzblBeEWYf SevfauKsvP/LUIfX9TTmvIa+/d7wH9UGV2Oe0= Received: by 10.110.84.2 with SMTP id h2mr16880729tib.7.1220710703900; Sat, 06 Sep 2008 07:18:23 -0700 (PDT) Received: from ?10.0.1.5? ( [118.100.112.248]) by mx.google.com with ESMTPS id b4sm4127578tic.14.2008.09.06.07.18.21 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 06 Sep 2008 07:18:22 -0700 (PDT) Message-ID: <48C29100.70609@gnu.org> Date: Sat, 06 Sep 2008 22:17:36 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Yary Hluchan Subject: Re: bug#899: 23.0.60; Opening a foo.tar.gz file crashes References: <200809052311.m85NBCQk004744@bell.apicom.com> In-Reply-To: <200809052311.m85NBCQk004744@bell.apicom.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Jason Rumney merge 716 899 thanks This bug has already been reported several times (the above are instructions to the bug tracking system which is bcc'ed). If there is any progress, you will be notified. Yary Hluchan wrote: > 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: > > Create a couple small text files- in my case sample1.txt containing: > Here is a sample. Hello! > and sample2.txt containing: > foo bar bat baz > > put them in an archive with: > tar -czf sample.tar.gz sample?.txt > > Then open a fresh instance of emacs, C-x C-f sample.tar.gz and it crashes. > > I don't have gdb installed, but I can give you a link to sample.tar.gz > http://www.driveway.com/r4h5t5i7r1 > My other tar.gz archives also crash emacs. > > 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 > c:/Program Files/Emacs/Unpatched/emacs/etc/DEBUG for instructions. > > > In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600) > of 2008-09-03 on LENNART-69DE564 > Windowing system distributor `Microsoft Corp.', version 5.1.2600 > configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include -fno-crossjumping' > > 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: ENU > value of $XMODIFIERS: nil > locale-coding-system: cp1252 > default-enable-multibyte-characters: t > > Major mode: Fundamental > > Minor modes in effect: > recentf-mode: t > partial-completion-mode: t > tooltip-mode: t > mouse-wheel-mode: t > menu-bar-mode: t > file-name-shadow-mode: t > global-font-lock-mode: t > blink-cursor-mode: t > global-auto-composition-mode: t > auto-encryption-mode: t > auto-compression-mode: t > line-number-mode: t > transient-mark-mode: t > > Recent input: > x r e p o r > > Recent messages: > > An error has occurred while loading `c:/Documents and Settings/Stephen Edwards/Application Data/.emacs': > > File error: Cannot open load file, menuacc > > To ensure normal operation, you should investigate and remove the > cause of the error in your initialization file. Start Emacs with > the `--debug-init' option to view a complete error backtrace. > > For information about GNU Emacs and the GNU system, type C-h C-a. > > > > > > From cyd@stupidchicken.com Sun Sep 7 11:51:04 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=-4.8 required=4.0 tests=AWL,BAYES_00, VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 7 Sep 2008 18:51:04 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87Ip1iO028294 for ; Sun, 7 Sep 2008 11:51:02 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 60AD757E354; Sun, 7 Sep 2008 14:53:49 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: close bug reports Date: Sun, 07 Sep 2008 14:53:49 -0400 Message-ID: <873akb948y.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii tags 330 moreinfo close 527 reassign 687 emacs,w32 reassign 716 emacs,w32 close 720 close 908 close 914 close 915 reassign 912 spam thanks From cyd@stupidchicken.com Mon Oct 6 11:57:52 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=-4.9 required=4.0 tests=AWL,BAYES_00, VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 6 Oct 2008 18:57:52 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m96IvnpE016776 for ; Mon, 6 Oct 2008 11:57:50 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 7538B57E0B6; Mon, 6 Oct 2008 14:59:21 -0400 (EDT) From: Chong Yidong To: control@debbugs.gnu.org Subject: reassign bug Date: Mon, 06 Oct 2008 14:59:21 -0400 Message-ID: <87k5clr1me.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii reassign 1088 emacs,w32 merge 805 1088 thanks From geoffgole@gmail.com Sat Nov 8 02:41:17 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=-4.2 required=4.0 tests=AWL,BAYES_00,HTML_MESSAGE, IMPRONONCABLE_2 autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 8 Nov 2008 10:41:17 +0000 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA8AfCb2022228 for <716@emacsbugs.donarmstrong.com>; Sat, 8 Nov 2008 02:41:13 -0800 Received: by fg-out-1718.google.com with SMTP id l27so1338177fgb.43 for <716@emacsbugs.donarmstrong.com>; Sat, 08 Nov 2008 02:41:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=4rIjjMaOWHnf1cJA3m7LZCsrzKK7fKg53G+m96/wZEA=; b=LG0xiW3rYZqcM9kW6qJ+UnlfT7N5ALv8dlfTtE+CMb1WyGDjFizjGXrJj1d5hFspgd /FJuZvuJU/EUzRm763GDrk3dV9zRDMFHbgL9nqRNt9z0tPNSgk+LeOk6AigcNC5rXWBj bNhI45FaOfaKC+bG5r9SXRte7LITnKRNx3GEQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=a2KEbtI0QfRwfdeB5i8EwZCfZrW0b6KndjopmxgPi4zO6kQvB/ImwLNanQLWmgBkr1 WnfW4ohAvmTwAMZ754HfrJJrQh9e/OkbzIw07Ysrg/JFqKfmk+yI9vpPo6xdh8bD0B7E g/coFqnP5lxwdtkwVrfA8e7U2GhDsGGh8xcv0= Received: by 10.187.224.11 with SMTP id b11mr955892far.81.1226140871891; Sat, 08 Nov 2008 02:41:11 -0800 (PST) Received: by 10.187.193.8 with HTTP; Sat, 8 Nov 2008 02:41:11 -0800 (PST) Message-ID: Date: Sat, 8 Nov 2008 02:41:11 -0800 From: "Geoff Gole" To: "Jason Rumney" , 716@debbugs.gnu.org Subject: Re: Bug in buffer-swap-text MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_49387_22778304.1226140871895" ------=_Part_49387_22778304.1226140871895 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I can reliably get a crash without changing coding systems: (progn (buffer-swap-text (generate-new-buffer "test")) (insert (make-string 128 ?a))) (progn (buffer-swap-text (generate-new-buffer "test")) (garbage-collect)) All the crashes I've seen with tar-mode or buffer-swap-text end up hitting the same call to abort in r_re_alloc(). Backtraces for the above lisp fragments (same order): (gdb) bt #0 w32_abort () at w32fns.c:7279 #1 0x01137df8 in r_re_alloc (ptr=0x2a27008, size=2129) at ralloc.c:1028 #2 0x0106ed4e in enlarge_buffer_text (b=0x2a27000, delta=2108) at buffer.c:5065 #3 0x010fe25e in make_gap_larger (nbytes_added=2108) at insdel.c:526 #4 0x010ff949 in insert_from_string_1 (string=47277539, pos=0, pos_byte=0, nchars=128, nbytes=128, inherit=0, before_markers=44199944) at insdel.c:1107 #5 0x01100da6 in insert_from_string (string=47277539, pos=0, pos_byte=0, length=128, length_byte=0, inherit=44199944) at insdel.c:1048 #6 0x0108d79c in general_insert_function (insert_func=0x1100fac , insert_from_string_func=0x1100d3b , inherit=0, nargs=1, args=0x82f3e0) at editfns.c:2184 #7 0x0108d86c in Finsert (nargs=0, args=0x0) at editfns.c:2228 #8 0x0100b364 in Feval (form=19643352) at eval.c:2378 #9 0x0100b632 in Fprogn (args=0) at eval.c:449 #10 0x0100b42b in Feval (form=18325836) at eval.c:2322 #11 0x0100be38 in Ffuncall (nargs=2, args=0x1179ef0) at eval.c:3044 #12 0x01111e63 in Fbyte_code (bytestr=0, vector=8582708, maxdepth=1) at bytecode.c:678 #13 0x0100b722 in funcall_lambda (fun=18972820, nargs=1, arg_vector=0x82f774) at eval.c:3231 #14 0x0100bc17 in Ffuncall (nargs=2, args=0x1218094) at eval.c:3101 #15 0x01111e63 in Fbyte_code (bytestr=0, vector=8583024, maxdepth=1) at bytecode.c:678 #16 0x0100b722 in funcall_lambda (fun=18973068, nargs=1, arg_vector=0x82f8b4) at eval.c:3231 #17 0x0100bc17 in Ffuncall (nargs=2, args=0x121818c) at eval.c:3101 #18 0x01111e63 in Fbyte_code (bytestr=0, vector=8583344, maxdepth=1) at bytecode.c:678 #19 0x0100b722 in funcall_lambda (fun=18971276, nargs=0, arg_vector=0x82fa24) at eval.c:3231 #20 0x0100bc17 in Ffuncall (nargs=1, args=0x1217a8c) at eval.c:3101 #21 0x0100d37f in apply1 (fn=53934297, arg=0) at eval.c:2785 #22 0x0110fdc5 in Fcall_interactively (function=53934297, record_flag=44161025, keys=44194564) at callint.c:389 #23 0x0100be11 in Ffuncall (nargs=4, args=0x12bf728) at eval.c:3050 #24 0x0100bfe9 in call3 (fn=0, arg1=0, arg2=0, arg3=0) at eval.c:2870 #25 0x01056cb9 in Fcommand_execute (cmd=53934297, record_flag=44161025, keys=0, special=44161025) at keyboard.c:10333 #26 0x0105e4e5 in command_loop_1 () at keyboard.c:1880 #27 0x01009f9e in internal_condition_case (bfun=0x105e180 , handlers=44224777, hfun=0x105772c ) at eval.c:1511 #28 0x01051cba in command_loop_2 () at keyboard.c:1338 #29 0x01009ed3 in internal_catch (tag=0, func=0x1051c97 , arg=44161025) at eval.c:1247 #30 0x01051ac7 in command_loop () at keyboard.c:1317 #31 0x01051b60 in recursive_edit_1 () at keyboard.c:942 #32 0x01051c81 in Frecursive_edit () at keyboard.c:1004 #33 0x01002e36 in main (argc=1, argv=0xa427b8) at emacs.c:1777 Lisp Backtrace: "insert" (0x82f3e0) "progn" (0x82f518) "eval" (0x82f638) "eval-last-sexp-1" (0x82f774) "eval-last-sexp" (0x82f8b4) "eval-print-last-sexp" (0x82fa24) "call-interactively" (0x82fc04) (gdb) (gdb) bt #0 w32_abort () at w32fns.c:7279 #1 0x01137df8 in r_re_alloc (ptr=0x2d56008, size=100) at ralloc.c:1028 #2 0x0106ed4e in enlarge_buffer_text (b=0x2d56000, delta=-1979) at buffer.c:5065 #3 0x010fe38a in make_gap_smaller (nbytes_removed=-1979) at insdel.c:600 #4 0x01065cab in Fgarbage_collect () at alloc.c:5022 #5 0x0100b383 in Feval (form=18331376) at eval.c:2372 #6 0x0100b632 in Fprogn (args=0) at eval.c:449 #7 0x0100b42b in Feval (form=18325836) at eval.c:2322 #8 0x0100be38 in Ffuncall (nargs=2, args=0x1179ef0) at eval.c:3044 #9 0x01111e63 in Fbyte_code (bytestr=0, vector=8582708, maxdepth=1) at bytecode.c:678 #10 0x0100b722 in funcall_lambda (fun=18972820, nargs=1, arg_vector=0x82f774) at eval.c:3231 #11 0x0100bc17 in Ffuncall (nargs=2, args=0x1218094) at eval.c:3101 #12 0x01111e63 in Fbyte_code (bytestr=0, vector=8583024, maxdepth=1) at bytecode.c:678 #13 0x0100b722 in funcall_lambda (fun=18973068, nargs=1, arg_vector=0x82f8b4) at eval.c:3231 #14 0x0100bc17 in Ffuncall (nargs=2, args=0x121818c) at eval.c:3101 #15 0x01111e63 in Fbyte_code (bytestr=0, vector=8583344, maxdepth=1) at bytecode.c:678 #16 0x0100b722 in funcall_lambda (fun=18971276, nargs=0, arg_vector=0x82fa24) at eval.c:3231 #17 0x0100bc17 in Ffuncall (nargs=1, args=0x1217a8c) at eval.c:3101 #18 0x0100d37f in apply1 (fn=53934297, arg=0) at eval.c:2785 #19 0x0110fdc5 in Fcall_interactively (function=53934297, record_flag=44161025, keys=44194564) at callint.c:389 #20 0x0100be11 in Ffuncall (nargs=4, args=0x12bf728) at eval.c:3050 #21 0x0100bfe9 in call3 (fn=0, arg1=0, arg2=0, arg3=0) at eval.c:2870 #22 0x01056cb9 in Fcommand_execute (cmd=53934297, record_flag=44161025, keys=0, special=44161025) at keyboard.c:10333 #23 0x0105e4e5 in command_loop_1 () at keyboard.c:1880 #24 0x01009f9e in internal_condition_case (bfun=0x105e180 , handlers=44224777, hfun=0x105772c ) at eval.c:1511 #25 0x01051cba in command_loop_2 () at keyboard.c:1338 #26 0x01009ed3 in internal_catch (tag=0, func=0x1051c97 , arg=44161025) at eval.c:1247 #27 0x01051ac7 in command_loop () at keyboard.c:1317 #28 0x01051b60 in recursive_edit_1 () at keyboard.c:942 #29 0x01051c81 in Frecursive_edit () at keyboard.c:1004 #30 0x01002e36 in main (argc=1, argv=0xa427b8) at emacs.c:1777 Lisp Backtrace: "garbage-collect" (0x82f420) "progn" (0x82f518) "eval" (0x82f638) "eval-last-sexp-1" (0x82f774) "eval-last-sexp" (0x82f8b4) "eval-print-last-sexp" (0x82fa24) "call-interactively" (0x82fc04) (gdb) ------=_Part_49387_22778304.1226140871895 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I can reliably get a crash without changing coding systems:

(progn
  (buffer-swap-text (generate-new-buffer "test"))
  (insert (make-string 128 ?a)))

(progn
  (buffer-swap-text (generate-new-buffer "test"))
  (garbage-collect))

All the crashes I've seen with tar-mode or
buffer-swap-text end up hitting the same call to abort in
r_re_alloc().

Backtraces for the above lisp fragments (same order):

(gdb) bt
#0  w32_abort () at w32fns.c:7279
#1  0x01137df8 in r_re_alloc (ptr=0x2a27008, size=2129) at ralloc.c:1028
#2  0x0106ed4e in enlarge_buffer_text (b=0x2a27000, delta=2108) at buffer.c:5065
#3  0x010fe25e in make_gap_larger (nbytes_added=2108) at insdel.c:526
#4  0x010ff949 in insert_from_string_1 (string=47277539, pos=0, pos_byte=0,
    nchars=128, nbytes=128, inherit=0, before_markers=44199944) at insdel.c:1107
#5  0x01100da6 in insert_from_string (string=47277539, pos=0, pos_byte=0, length=128,
    length_byte=0, inherit=44199944) at insdel.c:1048
#6  0x0108d79c in general_insert_function (insert_func=0x1100fac <insert>,
    insert_from_string_func=0x1100d3b <insert_from_string>, inherit=0, nargs=1,
    args=0x82f3e0) at editfns.c:2184
#7  0x0108d86c in Finsert (nargs=0, args=0x0) at editfns.c:2228
#8  0x0100b364 in Feval (form=19643352) at eval.c:2378
#9  0x0100b632 in Fprogn (args=0) at eval.c:449
#10 0x0100b42b in Feval (form=18325836) at eval.c:2322
#11 0x0100be38 in Ffuncall (nargs=2, args=0x1179ef0) at eval.c:3044
#12 0x01111e63 in Fbyte_code (bytestr=0, vector=8582708, maxdepth=1) at bytecode.c:678
#13 0x0100b722 in funcall_lambda (fun=18972820, nargs=1, arg_vector=0x82f774)
    at eval.c:3231
#14 0x0100bc17 in Ffuncall (nargs=2, args=0x1218094) at eval.c:3101
#15 0x01111e63 in Fbyte_code (bytestr=0, vector=8583024, maxdepth=1) at bytecode.c:678
#16 0x0100b722 in funcall_lambda (fun=18973068, nargs=1, arg_vector=0x82f8b4)
    at eval.c:3231
#17 0x0100bc17 in Ffuncall (nargs=2, args=0x121818c) at eval.c:3101
#18 0x01111e63 in Fbyte_code (bytestr=0, vector=8583344, maxdepth=1) at bytecode.c:678
#19 0x0100b722 in funcall_lambda (fun=18971276, nargs=0, arg_vector=0x82fa24)
    at eval.c:3231
#20 0x0100bc17 in Ffuncall (nargs=1, args=0x1217a8c) at eval.c:3101
#21 0x0100d37f in apply1 (fn=53934297, arg=0) at eval.c:2785
#22 0x0110fdc5 in Fcall_interactively (function=53934297, record_flag=44161025,
    keys=44194564) at callint.c:389
#23 0x0100be11 in Ffuncall (nargs=4, args=0x12bf728) at eval.c:3050
#24 0x0100bfe9 in call3 (fn=0, arg1=0, arg2=0, arg3=0) at eval.c:2870
#25 0x01056cb9 in Fcommand_execute (cmd=53934297, record_flag=44161025, keys=0,
    special=44161025) at keyboard.c:10333
#26 0x0105e4e5 in command_loop_1 () at keyboard.c:1880
#27 0x01009f9e in internal_condition_case (bfun=0x105e180 <command_loop_1>,
    handlers=44224777, hfun=0x105772c <cmd_error>) at eval.c:1511
#28 0x01051cba in command_loop_2 () at keyboard.c:1338
#29 0x01009ed3 in internal_catch (tag=0, func=0x1051c97 <command_loop_2>, arg=44161025)
    at eval.c:1247
#30 0x01051ac7 in command_loop () at keyboard.c:1317
#31 0x01051b60 in recursive_edit_1 () at keyboard.c:942
#32 0x01051c81 in Frecursive_edit () at keyboard.c:1004
#33 0x01002e36 in main (argc=1, argv=0xa427b8) at emacs.c:1777

Lisp Backtrace:
"insert" (0x82f3e0)
"progn" (0x82f518)
"eval" (0x82f638)
"eval-last-sexp-1" (0x82f774)
"eval-last-sexp" (0x82f8b4)
"eval-print-last-sexp" (0x82fa24)
"call-interactively" (0x82fc04)
(gdb)


(gdb) bt
#0  w32_abort () at w32fns.c:7279
#1  0x01137df8 in r_re_alloc (ptr=0x2d56008, size=100) at ralloc.c:1028
#2  0x0106ed4e in enlarge_buffer_text (b=0x2d56000, delta=-1979) at buffer.c:5065
#3  0x010fe38a in make_gap_smaller (nbytes_removed=-1979) at insdel.c:600
#4  0x01065cab in Fgarbage_collect () at alloc.c:5022
#5  0x0100b383 in Feval (form=18331376) at eval.c:2372
#6  0x0100b632 in Fprogn (args=0) at eval.c:449
#7  0x0100b42b in Feval (form=18325836) at eval.c:2322
#8  0x0100be38 in Ffuncall (nargs=2, args=0x1179ef0) at eval.c:3044
#9  0x01111e63 in Fbyte_code (bytestr=0, vector=8582708, maxdepth=1) at bytecode.c:678
#10 0x0100b722 in funcall_lambda (fun=18972820, nargs=1, arg_vector=0x82f774)
    at eval.c:3231
#11 0x0100bc17 in Ffuncall (nargs=2, args=0x1218094) at eval.c:3101
#12 0x01111e63 in Fbyte_code (bytestr=0, vector=8583024, maxdepth=1) at bytecode.c:678
#13 0x0100b722 in funcall_lambda (fun=18973068, nargs=1, arg_vector=0x82f8b4)
    at eval.c:3231
#14 0x0100bc17 in Ffuncall (nargs=2, args=0x121818c) at eval.c:3101
#15 0x01111e63 in Fbyte_code (bytestr=0, vector=8583344, maxdepth=1) at bytecode.c:678
#16 0x0100b722 in funcall_lambda (fun=18971276, nargs=0, arg_vector=0x82fa24)
    at eval.c:3231
#17 0x0100bc17 in Ffuncall (nargs=1, args=0x1217a8c) at eval.c:3101
#18 0x0100d37f in apply1 (fn=53934297, arg=0) at eval.c:2785
#19 0x0110fdc5 in Fcall_interactively (function=53934297, record_flag=44161025,
    keys=44194564) at callint.c:389
#20 0x0100be11 in Ffuncall (nargs=4, args=0x12bf728) at eval.c:3050
#21 0x0100bfe9 in call3 (fn=0, arg1=0, arg2=0, arg3=0) at eval.c:2870
#22 0x01056cb9 in Fcommand_execute (cmd=53934297, record_flag=44161025, keys=0,
    special=44161025) at keyboard.c:10333
#23 0x0105e4e5 in command_loop_1 () at keyboard.c:1880
#24 0x01009f9e in internal_condition_case (bfun=0x105e180 <command_loop_1>,
    handlers=44224777, hfun=0x105772c <cmd_error>) at eval.c:1511
#25 0x01051cba in command_loop_2 () at keyboard.c:1338
#26 0x01009ed3 in internal_catch (tag=0, func=0x1051c97 <command_loop_2>, arg=44161025)
    at eval.c:1247
#27 0x01051ac7 in command_loop () at keyboard.c:1317
#28 0x01051b60 in recursive_edit_1 () at keyboard.c:942
#29 0x01051c81 in Frecursive_edit () at keyboard.c:1004
#30 0x01002e36 in main (argc=1, argv=0xa427b8) at emacs.c:1777

Lisp Backtrace:
"garbage-collect" (0x82f420)
"progn" (0x82f518)
"eval" (0x82f638)
"eval-last-sexp-1" (0x82f774)
"eval-last-sexp" (0x82f8b4)
"eval-print-last-sexp" (0x82fa24)
"call-interactively" (0x82fc04)
(gdb)

------=_Part_49387_22778304.1226140871895-- From mange@freemail.hu Sat Nov 8 04:51:39 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.0 required=4.0 tests=AWL,BAYES_00,GMAIL, HAS_BUG_NUMBER,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 8 Nov 2008 12:51:39 +0000 Received: from atum.ita.chalmers.se (atum.ita.chalmers.se [129.16.4.148]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mA8CpZpl022425 for <716@emacsbugs.donarmstrong.com>; Sat, 8 Nov 2008 04:51:37 -0800 Received: from zemdatav.stor.no-ip.org (persephone.tekno.chalmers.se [129.16.30.195]) by mail.chalmers.se (Postfix) with ESMTP id 4C8E38590; Sat, 8 Nov 2008 13:51:34 +0100 (CET) Received: by zemdatav.stor.no-ip.org (Postfix, from userid 1000) id CF5AF45B73; Sat, 8 Nov 2008 12:51:31 +0000 (GMT) From: Magnus Henoch To: Geoff Gole Cc: 716@debbugs.gnu.org Subject: Re: bug#716: Bug in buffer-swap-text References: Mail-Copies-To: never Jabber-Id: legoscia@jabber.cd.chalmers.se Disposition-Notification-To: Magnus Henoch X-Hashcash: 1:23:081108:geoffgole@gmail.com::ALnx1VOl91Ef7ltE:000000000000000000000000000000000000000000AkyZ X-Hashcash: 1:23:081108:716@emacsbugs.donarmstrong.com::4QwGAbk1iVWgB5o5:0000000000000000000000000000000Sk5G Date: Sat, 08 Nov 2008 13:51:31 +0100 In-Reply-To: (Geoff Gole's message of "Sat, 8 Nov 2008 02:41:11 -0800") Message-ID: <87od0q1iuk.fsf@freemail.hu> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii "Geoff Gole" writes: > I can reliably get a crash without changing coding systems: > > (progn > (buffer-swap-text (generate-new-buffer "test")) > (insert (make-string 128 ?a))) > > (progn > (buffer-swap-text (generate-new-buffer "test")) > (garbage-collect)) I can confirm that either of these give a crash on NetBSD/powerpc, so the problem might not be Windows-specific. Magnus From lekktu@gmail.com Fri Nov 21 07:14:53 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.4 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 21 Nov 2008 15:14:53 +0000 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mALFEoMA008811 for <716@emacsbugs.donarmstrong.com>; Fri, 21 Nov 2008 07:14:51 -0800 Received: by yx-out-2324.google.com with SMTP id 8so459417yxg.31 for <716@emacsbugs.donarmstrong.com>; Fri, 21 Nov 2008 07:14:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Ze+PEUA4ejYi9cR/VtJG0NxhiB9Zl2l5WmvZnH4wycg=; b=xyUmpflEp6kpP6QSRjXh1OXmslovYlerijsiACTZSCYtBQvY1WlMVa4jcB8bsMrd60 oDUVUkY3RANYiFGGYINub4sDt1kNpV5IC9Tq1WaYWFzlt0kbZGboruTyPtB8e9MhYWzP FtM0utuAfJw5UwoaBe2wfELN4LunUQiWLZef8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=KwolCDyp30J7WzdNVb6zjjJsRu4/B0qmFGM3oEjJAZaeLkVABCY9Cy0Gh6jcyTrZVi 181wcDDbg3aaeuSzYAFmVwgag7V+mab2CLqzwYGLAg7QrG7npvkkgrXHs+w1RkKW2bQI Rb93AwbVABeBv+Pt/izUnO5BroBQ6ravHdKtg= Received: by 10.100.205.15 with SMTP id c15mr266173ang.16.1227280489719; Fri, 21 Nov 2008 07:14:49 -0800 (PST) Received: by 10.100.13.13 with HTTP; Fri, 21 Nov 2008 07:14:49 -0800 (PST) Message-ID: Date: Fri, 21 Nov 2008 16:14:49 +0100 From: "Juanma Barranquero" To: "Jason Rumney" , 716@debbugs.gnu.org Subject: Re: bug#716: Bug in buffer-swap-text (was Re: bug#716: 23.0.60; opening tgz file causes emacs crash) In-Reply-To: <48BBDDCE.50602@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48A3E7C9.8050509@tnei.co.uk> <48AEACC4.2000300@gnu.org> <48AEE576.4000606@gnu.org> <48BBDC27.1090601@f2s.com> <48BBDDCE.50602@gnu.org> On Mon, Sep 1, 2008 at 13:19, Jason Rumney wrote: > I've also found that the crash only happens if buffer-swap-text is called > from the binary buffer, and only if the other buffer is not binary. I cannot reproduce this bug with your test case; however, the crash opening .tar.gz files is still there. Juanma From monnier@IRO.UMontreal.CA Tue Dec 2 14:58:50 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.6 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 2 Dec 2008 22:58:51 +0000 Received: from chene.dit.umontreal.ca (chene.dit.umontreal.ca [132.204.246.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB2Mwle0027162 for <716@emacsbugs.donarmstrong.com>; Tue, 2 Dec 2008 14:58:48 -0800 Received: from alfajor.home (vpn-132-204-232-176.acd.umontreal.ca [132.204.232.176]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id mB2Mwk0o026243; Tue, 2 Dec 2008 17:58:46 -0500 Received: by alfajor.home (Postfix, from userid 20848) id D39E71C1D9; Tue, 2 Dec 2008 17:58:45 -0500 (EST) From: Stefan Monnier To: Geoff Gole Cc: 716@debbugs.gnu.org, "Jason Rumney" Subject: Re: bug#716: Bug in buffer-swap-text Message-ID: References: Date: Tue, 02 Dec 2008 17:58:45 -0500 In-Reply-To: (Geoff Gole's message of "Sat, 8 Nov 2008 02:41:11 -0800") 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-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV3160=0 > I can reliably get a crash without changing coding systems: > (progn > (buffer-swap-text (generate-new-buffer "test")) > (insert (make-string 128 ?a))) > (progn > (buffer-swap-text (generate-new-buffer "test")) > (garbage-collect)) I cannot seem to reproduce it here, tho I'm not 100% sure how you run the above code. Could you give a more detailed recipe, starting from "emacs -Q" and showing whether you use M-: or C-x C-e, ... ? Stefan From jasonr@f2s.com Tue Dec 2 16:12:00 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.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 3 Dec 2008 00:12:01 +0000 Received: from mk-outboundfilter-5-a-2.mail.uk.tiscali.com (mk-outboundfilter-5-a-2.mail.uk.tiscali.com [212.74.114.4]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB30BuiL014547 for <716@emacsbugs.donarmstrong.com>; Tue, 2 Dec 2008 16:11:58 -0800 X-Trace: 113551704/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-MX-ACCEPTED/f2s-freedom2surf-infrastructure/194.106.33.239/None/jasonr@f2s.com X-SBRS: None X-RemoteIP: 194.106.33.239 X-IP-MAIL-FROM: jasonr@f2s.com X-MUA: Internet Messaging Program (IMP) 3.2.3 X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsACAJ9dNUnCaiHv/2dsb2JhbACSNsA3gn8 X-IronPort-AV: E=Sophos;i="4.33,704,1220223600"; d="scan'208";a="113551704" X-IP-Direction: IN Received: from mail5.freedom2surf.net (HELO webmail1.freedom2surf.net) ([194.106.33.239]) by smtp.f2s.tiscali.co.uk with ESMTP; 03 Dec 2008 00:11:50 +0000 Received: from localhost (i-194-106-33-239 [127.0.0.1]) by webmail1.freedom2surf.net (Postfix) with ESMTP id 6FC21228539; Wed, 3 Dec 2008 00:11:50 +0000 (GMT) Received: from 61.4.103.130 ([61.4.103.130]) by webmail.freedom2surf.net (IMP) with HTTP for ; Wed, 3 Dec 2008 00:11:50 +0000 Message-ID: <1228263110.4935cec65ee1a@webmail.freedom2surf.net> Date: Wed, 3 Dec 2008 00:11:50 +0000 From: jasonr@f2s.com To: Stefan Monnier Cc: Geoff Gole , 716@debbugs.gnu.org, Jason Rumney Subject: Re: bug#716: Bug in buffer-swap-text References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.3 X-Originating-IP: 61.4.103.130 Quoting Stefan Monnier : > > I can reliably get a crash without changing coding systems: > > (progn > > (buffer-swap-text (generate-new-buffer "test")) > > (insert (make-string 128 ?a))) I get a crash at this point using C-x C-e on this line as the first activity in emacs -Q, after pasting the above into *scratch* and removing the > quotations. > > (progn > > (buffer-swap-text (generate-new-buffer "test")) > > (garbage-collect)) > > I cannot seem to reproduce it here, tho I'm not 100% sure how you run > the above code. Could you give a more detailed recipe, starting from > "emacs -Q" and showing whether you use M-: or C-x C-e, ... ? Can you reproduce it by evaluating the following first: (set-default-coding-systems 'iso-latin-1-dos) Possibly not, as setting the coding systems to ...-unix does not make the problem go away for me, and the user who saw the bug on NetBSD/powerpc did not report doing anything special like this to trigger the bug. From monnier@iro.umontreal.ca Tue Dec 2 18:44:59 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=-5.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 3 Dec 2008 02:45:00 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB32iu37020412 for <716@emacsbugs.donarmstrong.com>; Tue, 2 Dec 2008 18:44:58 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AswEAAmCNUnO+Jkl/2dsb2JhbACBbdESgn+BIw X-IronPort-AV: E=Sophos;i="4.33,705,1220241600"; d="scan'208";a="30567867" Received: from 206-248-153-37.dsl.teksavvy.com (HELO ceviche.home) ([206.248.153.37]) by ironport2-out.teksavvy.com with ESMTP; 02 Dec 2008 21:44:50 -0500 Received: by ceviche.home (Postfix, from userid 20848) id 9FA3BB400C; Tue, 2 Dec 2008 21:44:48 -0500 (EST) From: Stefan Monnier To: jasonr@f2s.com Cc: Geoff Gole , 716@debbugs.gnu.org, Jason Rumney Subject: Re: bug#716: Bug in buffer-swap-text Message-ID: References: <1228263110.4935cec65ee1a@webmail.freedom2surf.net> Date: Tue, 02 Dec 2008 21:44:48 -0500 In-Reply-To: <1228263110.4935cec65ee1a@webmail.freedom2surf.net> (jasonr@f2s.com's message of "Wed, 3 Dec 2008 00:11:50 +0000") 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 >> > I can reliably get a crash without changing coding systems: >> > (progn >> > (buffer-swap-text (generate-new-buffer "test")) >> > (insert (make-string 128 ?a))) > I get a crash at this point using C-x C-e on this line as the first > activity in emacs -Q, after pasting the above into *scratch* and > removing the > quotations. > Can you reproduce it by evaluating the following first: > (set-default-coding-systems 'iso-latin-1-dos) No, that doesn't help. I'm still not able to reproduce it. Stefan From jasonr@f2s.com Tue Dec 2 18:55:56 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.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, SPF_HELO_PASS autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 3 Dec 2008 02:55:56 +0000 Received: from mk-outboundfilter-6-a-2.mail.uk.tiscali.com (mk-outboundfilter-6-a-2.mail.uk.tiscali.com [212.74.114.16]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB32tqY5024046 for <716@emacsbugs.donarmstrong.com>; Tue, 2 Dec 2008 18:55:53 -0800 X-Trace: 57993954/mk-outboundfilter-6.mail.uk.tiscali.com/F2S/$F2S-MX-ACCEPTED/f2s-freedom2surf-infrastructure/194.106.33.239 X-SBRS: None X-RemoteIP: 194.106.33.239 X-IP-MAIL-FROM: jasonr@f2s.com X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsACANODNUnCaiHv/2dsb2JhbACSNsBFgn8 X-IronPort-AV: E=Sophos;i="4.33,705,1220223600"; d="scan'208";a="57993954" X-IP-Direction: IN Received: from mail5.freedom2surf.net (HELO webmail1.freedom2surf.net) ([194.106.33.239]) by smtp.f2s.tiscali.co.uk with ESMTP; 03 Dec 2008 02:55:46 +0000 Received: from localhost (i-194-106-33-239 [127.0.0.1]) by webmail1.freedom2surf.net (Postfix) with ESMTP id 92299228539; Wed, 3 Dec 2008 02:55:46 +0000 (GMT) Received: from 61.4.103.130 ([61.4.103.130]) by webmail.freedom2surf.net (IMP) with HTTP for ; Wed, 3 Dec 2008 02:55:46 +0000 Message-ID: <1228272946.4935f532858b8@webmail.freedom2surf.net> Date: Wed, 3 Dec 2008 02:55:46 +0000 From: jasonr@f2s.com To: Stefan Monnier Cc: Geoff Gole , 716@debbugs.gnu.org, Jason Rumney Subject: Re: bug#716: Bug in buffer-swap-text References: <1228263110.4935cec65ee1a@webmail.freedom2surf.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.3 X-Originating-IP: 61.4.103.130 Quoting Stefan Monnier : > >> > I can reliably get a crash without changing coding systems: > >> > (progn > >> > (buffer-swap-text (generate-new-buffer "test")) > >> > (insert (make-string 128 ?a))) > > I get a crash at this point using C-x C-e on this line as the first > > activity in emacs -Q, after pasting the above into *scratch* and > > removing the > quotations. > > Can you reproduce it by evaluating the following first: > > (set-default-coding-systems 'iso-latin-1-dos) > > No, that doesn't help. I'm still not able to reproduce it. Since the crashes seem to be happening when the swapped buffers are subsequently displayed, how about trying different font backends, for example: emacs -Q -xrm Emacs.fontBackend:x Not sure what font backend the user on NetBSD/powerpc was using, but there might be something that the xft font backend does that buffer-swap-text is relying on which the w32 and one of the x font backends are not doing correctly. From geoffgole@gmail.com Wed Dec 3 07:25:23 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.0 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 3 Dec 2008 15:25:24 +0000 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB3FPLnp024307 for <716@emacsbugs.donarmstrong.com>; Wed, 3 Dec 2008 07:25:22 -0800 Received: by wf-out-1314.google.com with SMTP id 26so4088267wfd.13 for <716@emacsbugs.donarmstrong.com>; Wed, 03 Dec 2008 07:25:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=TSI5BOGuybxpxFQWGdr3H13SUNVDhCxuyiqU37h4L6g=; b=Nk0h8qlNjS57RSSvmjjaHKAX/7VpqiAvNitgeO+Flp1VJU22JTewccssV8lNlu1MHE xsDgzWB18fdNHEFXieDPWgPTaMR1PLFesJDUgBRgoUWJOCds3H6Gv9jtYEMWwCHpWgm5 vUSFaSedpg10filIQSOvO1810D5nqH78HSJuA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=UV0liv7rrEaMUmBNEOjeP7AHNqgZ5h6Dcs7WPED/MimyNBM13sAnDUThX7RwWElcNm oYz28OAZ5OnKYzDoUD78J0aeHlXDbMMr1xA7d62IVLQs6ZVFn5PjOyLqTK507gcszfR6 XiiwOZARcz3aWExIyg62O4L7AMFf97/YeXwWU= Received: by 10.115.91.2 with SMTP id t2mr8249889wal.224.1228317920652; Wed, 03 Dec 2008 07:25:20 -0800 (PST) Received: by 10.114.60.18 with HTTP; Wed, 3 Dec 2008 07:25:20 -0800 (PST) Message-ID: Date: Thu, 4 Dec 2008 00:25:20 +0900 From: "Geoff Gole" To: 716@debbugs.gnu.org, jasonr@f2s.com, monnier@iro.umontreal.ca, jasonr@gnu.org Subject: Re: bug#716: Bug in buffer-swap-text MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline > I cannot seem to reproduce it here, tho I'm not 100% sure how you run > the above code. Could you give a more detailed recipe, starting from > "emacs -Q" and showing whether you use M-: or C-x C-e, ... ? As I recall I started from an emacs -Q, pasted the code into *scratch*, and hit C-j. Currently I'm on a different version of emacs to the one in which I observed the crashes: GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.11) of 2008-11-22 on elegiac, modified by Debian And with this emacs I can't reproduce the bug. > Not sure what font backend the user on NetBSD/powerpc was using, but there might > be something that the xft font backend does that buffer-swap-text is relying on > which the w32 and one of the x font backends are not doing correctly. If it's the font backend, then perhaps I won't see the crash with an emacs -nw -Q. I'll try and test this. From jasonrumney@gmail.com Wed Dec 3 07:43:06 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=-7.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 3 Dec 2008 15:43:06 +0000 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.189]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB3Fh2an028054 for <716@emacsbugs.donarmstrong.com>; Wed, 3 Dec 2008 07:43:04 -0800 Received: by ti-out-0910.google.com with SMTP id b6so2449181tic.1 for <716@emacsbugs.donarmstrong.com>; Wed, 03 Dec 2008 07:43:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding:sender; bh=yRqO/R9rvzRMjh3yicIsHZue+q7pNIkw4N0hnJ2X3C0=; b=Ui4nKGvEzZl1SCQVbSwEIg8k4xWgwkpAm2nuQ5u07wpxCvO+KPph0QlkBaFmjE72VC pFjs7/Ujm6q025cEJA+Hpis7jmXax3FunYjlUGiO3CFc6W4+UDWsFFt4P6GYz9u604b+ E7hN09KDfeOD2IwBPmLJqGF40YN33q0ramd+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :sender; b=ISw1NzXOyJw9Ug8tab/Ruw+9icV8fpF4ZUKzAvDeKw4O+gbx/oADQ2nJHVoWPwQ8gs 8Axc0RL0FfHuDzCruluf309F0Jpi00fE/4bul5VzWLBOqSDmDGMnfEju0zU+vqUdICfR SkEKa+ndkaQHXjj5Q0VSzLcXjYglqEE0ElHBY= Received: by 10.110.63.17 with SMTP id l17mr5364122tia.23.1228318982330; Wed, 03 Dec 2008 07:43:02 -0800 (PST) Received: from ?192.168.1.3? ([118.101.50.139]) by mx.google.com with ESMTPS id d1sm5018558tid.15.2008.12.03.07.42.59 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Dec 2008 07:43:01 -0800 (PST) Message-ID: <4936A8E4.7010407@f2s.com> Date: Wed, 03 Dec 2008 23:42:28 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Geoff Gole CC: 716@debbugs.gnu.org, monnier@iro.umontreal.ca, jasonr@gnu.org Subject: Re: bug#716: Bug in buffer-swap-text References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Jason Rumney Geoff Gole wrote: > If it's the font backend, then perhaps I won't see the crash with > an emacs -nw -Q. I'll try and test this. > Good point. I can reproduce it with emacs -nw -Q, so it is not the font backend. From geoffgole@gmail.com Wed Dec 3 07:46:43 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=-7.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 3 Dec 2008 15:46:44 +0000 Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.184]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB3Fkep2029250 for <716@emacsbugs.donarmstrong.com>; Wed, 3 Dec 2008 07:46:42 -0800 Received: by rn-out-0910.google.com with SMTP id j66so3202545rne.20 for <716@emacsbugs.donarmstrong.com>; Wed, 03 Dec 2008 07:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=4N6bAjQx2TUgB2ve1TcxRGP2MIUUWXLlO2Y8NjdIGAU=; b=nkSrq7hhpToLyfKCiw6L0YUi5P789kRj9q9Ib66bSFYsZLkuaLRvzH03ueFV452XCS 63HecRlUFZRadc1Cp4TN/A+ygdL19lHPh1bx4KO51K4S9TOB1hri9fJ31egcdRaTv60A dR7bSJkmh7irNMYKIx9BzGIZ4CPAgy3RKNZeA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=toykW7hoxPCS6tbG9d0G8NuveDkjX5OsGD0IDAt7R/KgSYJE3KTCoKj554yG7L+0fl bdULE4c+Y5F8eqMgdPs204VPh0t72vU82pKyzXoAd/G9GOgGZ9CCPasFalJn0+DhOmuV BjgH3351so58T2qzRX0nmVqNwyJFlvugKFOEk= Received: by 10.115.73.20 with SMTP id a20mr8291640wal.1.1228319199937; Wed, 03 Dec 2008 07:46:39 -0800 (PST) Received: by 10.114.60.18 with HTTP; Wed, 3 Dec 2008 07:46:39 -0800 (PST) Message-ID: Date: Wed, 3 Dec 2008 07:46:39 -0800 From: "Geoff Gole" To: "Jason Rumney" , monnier@iro.umontreal.ca, 716@debbugs.gnu.org Subject: Re: bug#716: Bug in buffer-swap-text In-Reply-To: <4936A8E4.7010407@f2s.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4936A8E4.7010407@f2s.com> > > Good point. I can reproduce it with emacs -nw -Q, so it is not the font > backend. > Yes, I can reproduce it with -nw -Q as well (under Windows). From monnier@iro.umontreal.ca Wed Dec 3 12:42:11 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=-5.8 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 716) by emacsbugs.donarmstrong.com; 3 Dec 2008 20:42:12 +0000 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB3Kg8pI007560 for <716@emacsbugs.donarmstrong.com>; Wed, 3 Dec 2008 12:42:10 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAOd9NknO+Jkl/2dsb2JhbACBbdErgn+BIw X-IronPort-AV: E=Sophos;i="4.33,710,1220241600"; d="scan'208";a="30610545" Received: from 206-248-153-37.dsl.teksavvy.com (HELO pastel.home) ([206.248.153.37]) by ironport2-out.teksavvy.com with ESMTP; 03 Dec 2008 15:42:02 -0500 Received: by pastel.home (Postfix, from userid 20848) id 39AE98BAF; Wed, 3 Dec 2008 15:42:02 -0500 (EST) From: Stefan Monnier To: "Geoff Gole" Cc: "Jason Rumney" , 716@debbugs.gnu.org Subject: Re: bug#716: Bug in buffer-swap-text Message-ID: References: <4936A8E4.7010407@f2s.com> Date: Wed, 03 Dec 2008 15:42:02 -0500 In-Reply-To: (Geoff Gole's message of "Wed, 3 Dec 2008 07:46:39 -0800") 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 >> Good point. I can reproduce it with emacs -nw -Q, so it is not the font >> backend. > Yes, I can reproduce it with -nw -Q as well (under Windows). Still no "luck" for me, Stefan From jasonrumney@gmail.com Tue Dec 9 06:42: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-Bayes: score:0.0000 Tokens: new, 36; hammy, 58; neutral, 40; spammy, 2. spammytokens:0.993-1--classify, 0.856-+--UD:com hammytokens:0.000-+--H*r:TLSv1, 0.000-+--HDKIM-Signature:sk:content, 0.000-+--H*F:U*jasonr, 0.000-+--w32, 0.000-+--HDomainKey-Signature:user-agent X-Spam-Status: No, score=-6.0 required=4.0 tests=BAYES_00,VALID_BTS_CONTROL autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 9 Dec 2008 14:42:05 +0000 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.191]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB9Eg0xg028689 for ; Tue, 9 Dec 2008 06:42:03 -0800 Received: by ti-out-0910.google.com with SMTP id b6so1172914tic.1 for ; Tue, 09 Dec 2008 06:41:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=SyhAGVT5SEWPt7JL+Sk25uYcxVqs0EC/PFWodzHSIu8=; b=EQS9HD2kiFrKPmGngbrIqcO8zTIyQu+N8koLzblZEZDKgBMt6HNnJL2x7xoggGBJzd Nv9/crz0WDt28yp/2sitrmA6satE0l5t/A2kmr6G+wOQtK/BdWU/wWEEaEmaW19zx0M2 VRtks59g7Z6g5LBrFCBWRJq06TJG6orA5QtGA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=Jq19Q2I4WdVvDQT52Ct4DNb3VaLAxL2tYB71Vz1y6OQhcDBHwdlHbbCT7YJ8zbL4O4 1/mCkyx2iPXhEJb36Tt9AfpY5zUVKniAGwjxZjepQeNggQHiN4DewdGdT6BxWRrWP8AM AngEcbz9TDq5d2KDca+nOyZhF8ZwNMXScbDVc= Received: by 10.110.86.3 with SMTP id j3mr250649tib.32.1228833719554; Tue, 09 Dec 2008 06:41:59 -0800 (PST) Received: from ?192.168.1.3? ([124.13.223.53]) by mx.google.com with ESMTPS id w5sm129942tib.34.2008.12.09.06.41.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 09 Dec 2008 06:41:57 -0800 (PST) Sender: Jason Rumney Message-ID: <493E8396.4010505@gnu.org> Date: Tue, 09 Dec 2008 22:41:26 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: classify w32 bugs Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit severity 592 grave severity 716 grave severity 719 grave severity 872 grave thanks From jasonrumney@gmail.com Tue Dec 23 04:45:55 2008 Received: (at 716) by emacsbugs.donarmstrong.com; 23 Dec 2008 12:45:55 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.185]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBNCjpOc007084 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 04:45:53 -0800 Received: by ti-out-0910.google.com with SMTP id b6so1806782tic.1 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 04:45:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=KqI4NpewEW2OvcE3+rXVbcT6XwantAWkWoOW1pcdZ3g=; b=NrtKuQC6kU1BDBDvyQpfcQ8LJNO+XEwsnqYzlWaUAF/AturNX0BeFh4h/YZVqFVxAp ayrIOYlmYc2sSk618OQULXIad49qy4RLAK8BayGCa/xtuGk0Mhw0GjDFG1CMc/Y1uMAH L7QJyuPELCG5hCdkWlgBFSFO0Gl73Wooz0NtU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=IQsFy5Fv6IGOWjQAPatZCQARHCAHYLxkAy20ITU4XPTX3GXdpFYdhhth9qV44EQIed VFwVTesm5Vbjot7+ROlDBsznWhwtxT221Rf9J8WsZnoyMez+vhoKTvDzvrMbaZkA8UNr 4Ji3ILXTFe7UZhzP6JSqhlvvsPkb27309dLD4= Received: by 10.110.41.17 with SMTP id o17mr6414748tio.48.1230036350486; Tue, 23 Dec 2008 04:45:50 -0800 (PST) Received: from ?192.168.1.3? ([118.101.181.97]) by mx.google.com with ESMTPS id w12sm1026404tib.13.2008.12.23.04.45.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 23 Dec 2008 04:45:49 -0800 (PST) Sender: Jason Rumney Message-ID: <4950DD60.4080202@gnu.org> Date: Tue, 23 Dec 2008 20:45:20 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Stefan Monnier , Magnus Henoch CC: 716@debbugs.gnu.org Subject: Re: bug#716: Bug in buffer-swap-text References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Stefan Monnier wrote: >> I can reliably get a crash without changing coding systems: >> (progn >> (buffer-swap-text (generate-new-buffer "test")) >> (insert (make-string 128 ?a))) >> >> (progn >> (buffer-swap-text (generate-new-buffer "test")) >> (garbage-collect)) >> > > I cannot seem to reproduce it here, tho I'm not 100% sure how you run > the above code. Could you give a more detailed recipe, starting from > "emacs -Q" and showing whether you use M-: or C-x C-e, ... ? > One possible variable here is the way that buffer space is allocated. On Windows, it seems REL_ALLOC is defined. I presume GNU/Linux defines USE_MMAP_FOR_BUFFERS which would cause it to take a different code path around the point where we see a crash on Windows, and as Magnus Henoch saw on NetBSD/powerpc also (though we don't have a stack trace for that crash, so can't tell for sure it is crashing in the same place). Magnus, does src/config.h have either of these constants defined on your NetBSD/powerpc machine? A third possibility if neither of those are defined is that xmalloc/xfree/xrealloc are used. From jasonrumney@gmail.com Tue Dec 23 06:52:13 2008 Received: (at 716) by emacsbugs.donarmstrong.com; 23 Dec 2008 14:52:14 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=HAS_BUG_NUMBER,MIXEDBDN, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.186]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBNEq6gG019979 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 06:52:08 -0800 Received: by ti-out-0910.google.com with SMTP id b6so1845051tic.1 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 06:52:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=7sIApbofwOUBxvw96ou/pkPzlTiWdqA6SLOgB3eJxnY=; b=PWYBSzaG6M7qLc3fUO0wx0kVnf6VO+7B54p4r3M9do/JBVDEOft8QG9SdDVZ3KRQxR cLp41sy8Mi4XkbdPsUGq1y4Tkvlg02Y7l2PET8CuNVjvlltrBRTc3hroJGTHkC0hsAys hEMNf/s+gl5xIPhOO7zp6fkOyFgkS3w/zQ958= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=Jl0zOlgKbqdEpq+UnQceGgSqSeG8/JKNbP3kHLEWtbfPBMRC0SjfPf/ImbnjZpqjsG qhX/pTdjjkHRNdwCHb79J1BCqQS0ksAYWCdvXaHUntGTc+AW6KRr0v8lLGbTugmy8pZL eUUFbFOMjlR9TWuuDO1oxplnWf59b1LFQ6tYA= Received: by 10.110.31.5 with SMTP id e5mr217417tie.45.1230043925998; Tue, 23 Dec 2008 06:52:05 -0800 (PST) Received: from ?192.168.1.3? ([118.101.181.97]) by mx.google.com with ESMTPS id a14sm1236981tia.12.2008.12.23.06.52.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 23 Dec 2008 06:52:05 -0800 (PST) Sender: Jason Rumney Message-ID: <4950FAF6.808@f2s.com> Date: Tue, 23 Dec 2008 22:51:34 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Stefan Monnier CC: Magnus Henoch , 716@debbugs.gnu.org Subject: Re: bug#716: Bug in buffer-swap-text References: <4950DD60.4080202@gnu.org> In-Reply-To: <4950DD60.4080202@gnu.org> Content-Type: multipart/mixed; boundary="------------000103070006060205020408" This is a multi-part message in MIME format. --------------000103070006060205020408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jason Rumney wrote: > One possible variable here is the way that buffer space is allocated. > On Windows, it seems REL_ALLOC is defined. I presume GNU/Linux defines > USE_MMAP_FOR_BUFFERS which would cause it to take a different code > path around the point where we see a crash on Windows, and as Magnus > Henoch saw on NetBSD/powerpc also (though we don't have a stack trace > for that crash, so can't tell for sure it is crashing in the same place). The following patch seems to fix the problem, does it look correct to others who might understand ralloc.c and buffer_swap_text better than I do? --------------000103070006060205020408 Content-Type: text/plain; name="bug716.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bug716.diff" Index: buffer.c =================================================================== RCS file: /sources/emacs/emacs/src/buffer.c,v retrieving revision 1.575 diff -r1.575 buffer.c 2184a2185,2189 > #ifdef REL_ALLOC > extern void r_alloc_prepare_to_swap_pointers P_ ((POINTER_TYPE **, > POINTER_TYPE **)); > #endif > 2222a2228,2232 > #ifdef REL_ALLOC > r_alloc_prepare_to_swap_pointers (¤t_buffer->own_text.beg, > &other_buffer->own_text.beg); > #endif > Index: ralloc.c =================================================================== RCS file: /sources/emacs/emacs/src/ralloc.c,v retrieving revision 1.69 diff -r1.69 ralloc.c 1225a1226,1248 > /* Swap relocatable data between two pointers. > This is used by buffer_swap_text. Since buffer_swap_text swaps the > whole text structure in one go, this function has been written to only > update the internal pointers back to the variables, ready for when the > swap is actually done. It must be called before the pointers are > swapped so that the state is consistent when find_bloc is called. */ > void > r_alloc_prepare_to_swap_pointers (p1, p2) > POINTER *p1, *p2; > { > bloc_ptr bloc1, bloc2; > bloc1 = find_bloc (p1); > bloc2 = find_bloc (p2); > if (bloc1 == NIL_BLOC || bloc2 == NIL_BLOC) > abort (); > > /* Swap internal pointers back to the variables. */ > bloc1->variable = p2; > bloc2->variable = p1; > > /* It would be cleaner to do the actual swap here too, but it would > complicate buffer_swap_text. */ > } --------------000103070006060205020408-- From jasonrumney@gmail.com Tue Dec 23 07:15:04 2008 Received: (at 716) by emacsbugs.donarmstrong.com; 23 Dec 2008 15:15:05 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.0 required=4.0 tests=HAS_BUG_NUMBER,MIXEDBDN, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.185]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBNFEwt1027707 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 07:15:01 -0800 Received: by ti-out-0910.google.com with SMTP id b6so1851726tic.1 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 07:14:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=/Zp4uDGKS2+HmEqR+9bjdgq/MtnjgKrDw8b2bt2UdTM=; b=CoUU7C8aB9EoUifI+qCAPDCAnHSToNRGckxDK7dCX2q3KOZKqkE3G1xtpX6Cst4Zjf cbDQlS/zG35V8j1xJHNHlRh1hKm8pHS1eQFOcrp2iqPC2iJwGosK/SJGc+/r35BIfwmW eLNFwedl1g46ka6yIEdv52+4yf45Arc/x3m5w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=CcbLBmaIDl2R15uXAq6UjzzVlwin7x+ZfrcpZRqNfI1+YWti7MMo1eY7TGHnfgpdJ5 oMPRNpHg7ARNlXB7L8tWezBS7PvnzETV/WkMjWLt56QLp+uLhH4a6EVOvf2j+4rXNbbA Eg/heUzx81ipQ30TvcrWKJxqN9DrFxUEavRus= Received: by 10.110.105.5 with SMTP id d5mr7106581tic.47.1230045298091; Tue, 23 Dec 2008 07:14:58 -0800 (PST) Received: from ?192.168.1.3? ([118.101.181.97]) by mx.google.com with ESMTPS id j5sm326837tid.38.2008.12.23.07.14.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 23 Dec 2008 07:14:57 -0800 (PST) Sender: Jason Rumney Message-ID: <49510053.6020805@f2s.com> Date: Tue, 23 Dec 2008 23:14:27 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Jason Rumney , 716@debbugs.gnu.org CC: Stefan Monnier , Magnus Henoch Subject: Re: bug#716: Bug in buffer-swap-text References: <4950DD60.4080202@gnu.org> <4950FAF6.808@f2s.com> In-Reply-To: <4950FAF6.808@f2s.com> Content-Type: multipart/mixed; boundary="------------080709070700060602090603" This is a multi-part message in MIME format. --------------080709070700060602090603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jason Rumney wrote: > Jason Rumney wrote: >> One possible variable here is the way that buffer space is allocated. >> On Windows, it seems REL_ALLOC is defined. I presume GNU/Linux >> defines USE_MMAP_FOR_BUFFERS which would cause it to take a different >> code path around the point where we see a crash on Windows, and as >> Magnus Henoch saw on NetBSD/powerpc also (though we don't have a >> stack trace for that crash, so can't tell for sure it is crashing in >> the same place). > The following patch seems to fix the problem, does it look correct to > others who might understand ralloc.c and buffer_swap_text better than > I do? Sorry, once more with context: --------------080709070700060602090603 Content-Type: text/plain; name="bug716.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bug716.diff" Index: buffer.c =================================================================== RCS file: /sources/emacs/emacs/src/buffer.c,v retrieving revision 1.575 diff -c -r1.575 buffer.c *** buffer.c 9 Dec 2008 23:08:05 -0000 1.575 --- buffer.c 23 Dec 2008 14:37:33 -0000 *************** *** 2182,2187 **** --- 2182,2192 ---- return byte_pos; } + #ifdef REL_ALLOC + extern void r_alloc_prepare_to_swap_pointers P_ ((POINTER_TYPE **, + POINTER_TYPE **)); + #endif + DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, 1, 1, 0, doc: /* Swap the text between current buffer and BUFFER. */) *************** *** 2220,2225 **** --- 2225,2235 ---- current_buffer->field = tmp##field; \ } while (0) + #ifdef REL_ALLOC + r_alloc_prepare_to_swap_pointers (¤t_buffer->own_text.beg, + &other_buffer->own_text.beg); + #endif + swapfield (own_text, struct buffer_text); eassert (current_buffer->text == ¤t_buffer->own_text); eassert (other_buffer->text == &other_buffer->own_text); Index: ralloc.c =================================================================== RCS file: /sources/emacs/emacs/src/ralloc.c,v retrieving revision 1.69 diff -c -r1.69 ralloc.c *** ralloc.c 21 Nov 2008 12:14:07 -0000 1.69 --- ralloc.c 23 Dec 2008 14:40:52 -0000 *************** *** 1223,1228 **** --- 1223,1251 ---- #endif /* DEBUG */ + /* Swap relocatable data between two pointers. + This is used by buffer_swap_text. Since buffer_swap_text swaps the + whole text structure in one go, this function has been written to only + update the internal pointers back to the variables, ready for when the + swap is actually done. It must be called before the pointers are + swapped so that the state is consistent when find_bloc is called. */ + void + r_alloc_prepare_to_swap_pointers (p1, p2) + POINTER *p1, *p2; + { + bloc_ptr bloc1, bloc2; + bloc1 = find_bloc (p1); + bloc2 = find_bloc (p2); + if (bloc1 == NIL_BLOC || bloc2 == NIL_BLOC) + abort (); + + /* Swap internal pointers back to the variables. */ + bloc1->variable = p2; + bloc2->variable = p1; + + /* It would be cleaner to do the actual swap here too, but it would + complicate buffer_swap_text. */ + } /*********************************************************************** --------------080709070700060602090603-- From monnier@iro.umontreal.ca Tue Dec 23 09:24:04 2008 Received: (at 716) by emacsbugs.donarmstrong.com; 23 Dec 2008 17:24:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.4 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.pppoe.ca [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBNHO0Tk007564 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 09:24:02 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAAqtUElMCqh5/2dsb2JhbACBbL1/WJFrhkOBYg X-IronPort-AV: E=Sophos;i="4.36,272,1228107600"; d="scan'208";a="31419873" Received: from 76-10-168-121.dsl.teksavvy.com (HELO pastel.home) ([76.10.168.121]) by ironport2-out.teksavvy.com with ESMTP; 23 Dec 2008 12:23:54 -0500 Received: by pastel.home (Postfix, from userid 20848) id DE6BA8780; Tue, 23 Dec 2008 12:23:54 -0500 (EST) From: Stefan Monnier To: Jason Rumney Cc: 716@debbugs.gnu.org, Magnus Henoch Subject: Re: bug#716: Bug in buffer-swap-text Message-ID: References: <4950DD60.4080202@gnu.org> <4950FAF6.808@f2s.com> <49510053.6020805@f2s.com> Date: Tue, 23 Dec 2008 12:23:54 -0500 In-Reply-To: <49510053.6020805@f2s.com> (Jason Rumney's message of "Tue, 23 Dec 2008 23:14:27 +0800") 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 >>> One possible variable here is the way that buffer space is allocated. On >>> Windows, it seems REL_ALLOC is defined. I presume GNU/Linux defines >>> USE_MMAP_FOR_BUFFERS which would cause it to take a different code path >>> around the point where we see a crash on Windows, and as Magnus Henoch >>> saw on NetBSD/powerpc also (though we don't have a stack trace for that >>> crash, so can't tell for sure it is crashing in the same place). >> The following patch seems to fix the problem, does it look correct to >> others who might understand ralloc.c and buffer_swap_text better than >> I do? > Sorry, once more with context: Your analysis sounds right, thank you. I'd suggest to use another r_alloc primitve, something like r_alloc_reset_variable, so you could do r_alloc_reset_variable(¤t_buffer->own_text.beg); r_alloc_reset_variable(&other_buffer->own_text.beg); after the swap. It could use the untested patch below. WDYT? Stefan === modified file 'src/ralloc.c' --- src/ralloc.c 2008-11-21 19:14:07 +0000 +++ src/ralloc.c 2008-12-23 17:23:02 +0000 @@ -402,7 +402,7 @@ while (p != NIL_BLOC) { - if (p->variable == ptr && p->data == *ptr) + if (p->data == *ptr) return p; p = p->next; @@ -1223,6 +1223,15 @@ #endif /* DEBUG */ +/* Change the variable of the bloc pointed from `p' to be `p'. */ +void r_alloc_reset_variable (POINTER *p) +{ + bloc_ptr bloc = find_bloc (p); + if (bloc == NIL_BLOC) + abort (); + bloc->variable = p; +} + /*********************************************************************** From jasonrumney@gmail.com Tue Dec 23 15:16:01 2008 Received: (at 716) by emacsbugs.donarmstrong.com; 23 Dec 2008 23:16:01 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.9 required=4.0 tests=FOURLA,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.186]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBNNFvxf031232 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 15:15:58 -0800 Received: by ti-out-0910.google.com with SMTP id b6so1915938tic.1 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 15:15:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=hElpO/+PpCkOz07LLCSCUE23kih1Se4HIrj+aSz92Jk=; b=kHl+075kfmbGFwd6N0lREuH7O/bXl503koTo4GRfJFFNh5OOw3CjH44v2ix/AN0IqK U3nm4bJyad5AlqN5kDSK3P+ARnQVPLqCmtRQa50li1Enbe44R5MtdtcWiQB/IHaLXs/3 wINz5zHDEZ6CTdl/eIYgITksfhZvAyeYWhZlo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=rFFPZHS9ps1MAML3IgPE7EWkE7WVCaymK6SZGAo74Dtl9tZHOftis4drTqbmPjSwCQ 9WnFrpG+Eh1Hhwoe0UXIQiu7dTQylSxcWAFm8rA487/+QWekcGcIfYPOgJo3KZTjYsrC C4IvC/H4mMoEH2vNMXHSRuid1UPUoG28nhNyc= Received: by 10.110.57.6 with SMTP id f6mr7621569tia.51.1230074156876; Tue, 23 Dec 2008 15:15:56 -0800 (PST) Received: from ?192.168.1.2? ([118.101.181.97]) by mx.google.com with ESMTPS id a14sm2426161tia.32.2008.12.23.15.15.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 23 Dec 2008 15:15:55 -0800 (PST) Sender: Jason Rumney Message-ID: <4951710E.2080407@f2s.com> Date: Wed, 24 Dec 2008 07:15:26 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Stefan Monnier CC: 716@debbugs.gnu.org Subject: Re: bug#716: Bug in buffer-swap-text References: <4950DD60.4080202@gnu.org> <4950FAF6.808@f2s.com> <49510053.6020805@f2s.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Stefan Monnier wrote: > Your analysis sounds right, thank you. I'd suggest to use another > r_alloc primitve, something like r_alloc_reset_variable, so you could do > > r_alloc_reset_variable(¤t_buffer->own_text.beg); > r_alloc_reset_variable(&other_buffer->own_text.beg); > > after the swap. It could use the untested patch below. WDYT? > > > === modified file 'src/ralloc.c' > --- src/ralloc.c 2008-11-21 19:14:07 +0000 > +++ src/ralloc.c 2008-12-23 17:23:02 +0000 > @@ -402,7 +402,7 @@ > > while (p != NIL_BLOC) > { > - if (p->variable == ptr && p->data == *ptr) > + if (p->data == *ptr) > return p; > > p = p->next; > This removes the consistency check, without which we would have taken much longer to find this problem, as Emacs would not have aborted when no bloc could be found, and the problem would have been memory corruption later when that bloc of memory was moved and the wrong pointer updated. From jasonr@f2s.com Tue Dec 23 17:17:24 2008 Received: (at 716) by emacsbugs.donarmstrong.com; 24 Dec 2008 01:17:24 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from mk-outboundfilter-5-a-2.mail.uk.tiscali.com (mk-outboundfilter-5-a-2.mail.uk.tiscali.com [212.74.114.4]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBO1HJR4004853 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 17:17:22 -0800 X-Trace: 119389305/mk-outboundfilter-5.mail.uk.tiscali.com/F2S/$F2S-MX-ACCEPTED/f2s-freedom2surf-infrastructure/194.106.33.239/None/jasonr@f2s.com X-SBRS: None X-RemoteIP: 194.106.33.239 X-IP-MAIL-FROM: jasonr@f2s.com X-MUA: Internet Messaging Program (IMP) 3.2.3 X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An0DAOQcUUnCaiHv/2dsb2JhbACSY6tBWJFthkI X-IronPort-AV: E=Sophos;i="4.36,274,1228089600"; d="scan'208";a="119389305" X-IP-Direction: IN Received: from mail5.freedom2surf.net (HELO webmail1.freedom2surf.net) ([194.106.33.239]) by smtp.f2s.tiscali.co.uk with ESMTP; 24 Dec 2008 01:17:08 +0000 Received: from localhost (i-194-106-33-239 [127.0.0.1]) by webmail1.freedom2surf.net (Postfix) with ESMTP id B85A5228539; Wed, 24 Dec 2008 01:17:08 +0000 (GMT) Received: from 61.4.103.130 ([61.4.103.130]) by webmail.freedom2surf.net (IMP) with HTTP for ; Wed, 24 Dec 2008 01:17:08 +0000 Message-ID: <1230081428.49518d94a3a08@webmail.freedom2surf.net> Date: Wed, 24 Dec 2008 01:17:08 +0000 From: jasonr@f2s.com To: Stefan Monnier Cc: 716@debbugs.gnu.org, Magnus Henoch Subject: Re: bug#716: Bug in buffer-swap-text References: <4950DD60.4080202@gnu.org> <4950FAF6.808@f2s.com> <49510053.6020805@f2s.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.3 X-Originating-IP: 61.4.103.130 Quoting Stefan Monnier : > Your analysis sounds right, thank you. I'd suggest to use another > r_alloc primitve, something like r_alloc_reset_variable, so you could do I've adapted your suggestion so it does not remove the consistency check in find_bloc (instead it does a non-checking find inline): *** buffer.c.~1.575.~ 2008-12-10 21:52:40.562500000 +0800 --- buffer.c 2008-12-24 09:12:15.536522600 +0800 *************** *** 2182,2187 **** --- 2182,2191 ---- return byte_pos; } + #ifdef REL_ALLOC + extern void r_alloc_reset_variable P_ ((PTR *)); + #endif + DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text, 1, 1, 0, doc: /* Swap the text between current buffer and BUFFER. */) *************** *** 2223,2228 **** --- 2227,2237 ---- swapfield (own_text, struct buffer_text); eassert (current_buffer->text == ¤t_buffer->own_text); eassert (other_buffer->text == &other_buffer->own_text); + #ifdef REL_ALLOC + r_alloc_reset_variable ((PTR *) ¤t_buffer->own_text.beg); + r_alloc_reset_variable ((PTR *) &other_buffer->own_text.beg); + #endif + swapfield (pt, EMACS_INT); swapfield (pt_byte, EMACS_INT); swapfield (begv, EMACS_INT); *** ralloc.c.~1.69.~ 2008-11-23 22:34:01.250000000 +0800 --- ralloc.c 2008-12-24 09:12:35.643967100 +0800 *************** *** 1223,1228 **** --- 1223,1254 ---- #endif /* DEBUG */ + /* Update the internal record of which variable points to some data. + Used by buffer-swap-text in Emacs to restore consistency after it + swaps the buffer text between two buffer objects. */ + void + r_alloc_reset_variable (ptr) + POINTER *ptr; + { + bloc_ptr bloc = first_bloc; + + /* Find the bloc that corresponds to the data pointed to by pointer. + find_bloc cannot be used, as it has internal consistency checks + which fail when the variable needs reseting. */ + while (bloc != NIL_BLOC) + { + if (bloc->data == *ptr) + break; + + bloc = bloc->next; + } + + if (bloc == NIL_BLOC) + abort (); + + /* Update variable to point to the new location. */ + bloc->variable = ptr; + } /*********************************************************************** From monnier@iro.umontreal.ca Tue Dec 23 18:41:32 2008 Received: (at 716) by emacsbugs.donarmstrong.com; 24 Dec 2008 02:41:32 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.5 required=4.0 tests=HAS_BUG_NUMBER,XIRONPORT autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBO2fSRj030361 for <716@emacsbugs.donarmstrong.com>; Tue, 23 Dec 2008 18:41:30 -0800 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsgEAEYwUUlFxKfZ/2dsb2JhbACBa7xLWJFjhkKBYg X-IronPort-AV: E=Sophos;i="4.36,274,1228107600"; d="scan'208";a="31438500" Received: from 69-196-167-217.dsl.teksavvy.com (HELO pastel.home) ([69.196.167.217]) by ironport2-out.teksavvy.com with ESMTP; 23 Dec 2008 21:41:22 -0500 Received: by pastel.home (Postfix, from userid 20848) id 95BAD8780; Tue, 23 Dec 2008 21:41:22 -0500 (EST) From: Stefan Monnier To: jasonr@f2s.com Cc: 716@debbugs.gnu.org, Magnus Henoch Subject: Re: bug#716: Bug in buffer-swap-text Message-ID: References: <4950DD60.4080202@gnu.org> <4950FAF6.808@f2s.com> <49510053.6020805@f2s.com> <1230081428.49518d94a3a08@webmail.freedom2surf.net> Date: Tue, 23 Dec 2008 21:41:22 -0500 In-Reply-To: <1230081428.49518d94a3a08@webmail.freedom2surf.net> (jasonr@f2s.com's message of "Wed, 24 Dec 2008 01:17:08 +0000") 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 >> Your analysis sounds right, thank you. I'd suggest to use another >> r_alloc primitve, something like r_alloc_reset_variable, so you could do > I've adapted your suggestion so it does not remove the consistency check in > find_bloc (instead it does a non-checking find inline): Thanks. After your email, I thought we could just change r_alloc_reset_variable to take 2 arguments: the old ptr and the new ptr. This way, you get more consistency checking. BTW, if the double check (p->variable == ptr && p->data == *ptr) is there for consistency, it would be good to add a comment about it. Better yet: make it a real consistency check, along the lines of assert (*p->variable == p->data); so it's not just checked for `ptr', but for all blocs visited in the loop. Stefan From jasonrumney@gmail.com Wed Dec 24 03:21:04 2008 Received: (at 716-done) by emacsbugs.donarmstrong.com; 24 Dec 2008 11:21:04 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.186]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mBOBL0mq018440 for <716-done@emacsbugs.donarmstrong.com>; Wed, 24 Dec 2008 03:21:01 -0800 Received: by ti-out-0910.google.com with SMTP id b6so2136616tic.1 for <716-done@emacsbugs.donarmstrong.com>; Wed, 24 Dec 2008 03:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=ToKVx3xwOTc0FUIHvsU2g9g0kE4vIJBUJvrOCA7C1vg=; b=X78ezJi1lDnk/WHcYFP/GTZvGbUJKZ9twVyMASjolPvkNDWXoI1teKketa8VRlPL2i IEv3vMU18XqKIdd7iSgZ1BJkvMsA60SkKm+MWITiYRia/c5B8yVri7llbjBEitmGuiow L3BeCAh/V2YUypweLUwPEux/+9wIBqe5q4RKI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=XZZCgUwI16KeYR5TcrXbYhckhNlti++ojWfhg9pp2K5y5GKEgjMsBzgjzALk/Uq8uP Pxf4xHQqa+SCnavHdWaMTeAG4/9Bdf5emKd7mwj0VrwHdTgL1ne5M8Vu1Qi6Zmo3etaE I/LTAMJr2tEwu7JgDWOz3oObRsLysubm8AY5E= Received: by 10.110.105.10 with SMTP id d10mr1720105tic.33.1230117659663; Wed, 24 Dec 2008 03:20:59 -0800 (PST) Received: from ?192.168.1.2? ([118.101.181.97]) by mx.google.com with ESMTPS id 22sm367022tim.15.2008.12.24.03.20.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 24 Dec 2008 03:20:58 -0800 (PST) Sender: Jason Rumney Message-ID: <49521AFE.4030105@gnu.org> Date: Wed, 24 Dec 2008 19:20:30 +0800 From: Jason Rumney User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: 716-done@debbugs.gnu.org Subject: Re: bug#716: Bug in buffer-swap-text References: <4950DD60.4080202@gnu.org> <4950FAF6.808@f2s.com> <49510053.6020805@f2s.com> <1230081428.49518d94a3a08@webmail.freedom2surf.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Stefan Monnier wrote: > Thanks. After your email, I thought we could just change > r_alloc_reset_variable to take 2 arguments: the old ptr and the > new ptr. This way, you get more consistency checking. > I've checked in a change that does this. From unknown Fri Jun 20 07:10:29 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 21 Jan 2009 15:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator