From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#13743: 24.2.93; Segmentation fault when trying to [s]teal a file opened elsewhere Date: Thu, 21 Feb 2013 12:30:24 +0400 Message-ID: <5125DB20.4090609@yandex.ru> References: <87r4kexgx0.fsf@yandex.ru> <8338wtr48p.fsf@gnu.org> <5122CCEB.8000206@yandex.ru> <83ehgaok86.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070200020801040400020506" X-Trace: ger.gmane.org 1361435466 22344 80.91.229.3 (21 Feb 2013 08:31:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Feb 2013 08:31:06 +0000 (UTC) Cc: 13743@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 21 09:31:26 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1U8RYp-0002cH-8A for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Feb 2013 09:31:23 +0100 Original-Received: from localhost ([::1]:33104 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8RYU-0004ab-SR for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Feb 2013 03:31:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8RYK-0004ZG-Eb for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 03:31:00 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U8RYF-0004Z4-AC for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 03:30:52 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U8RYF-0004Yx-4b for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 03:30:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U8RZS-0001Jv-1D for bug-gnu-emacs@gnu.org; Thu, 21 Feb 2013 03:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Feb 2013 08:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13743 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13743-submit@debbugs.gnu.org id=B13743.13614354955040 (code B ref 13743); Thu, 21 Feb 2013 08:32:01 +0000 Original-Received: (at 13743) by debbugs.gnu.org; 21 Feb 2013 08:31:35 +0000 Original-Received: from localhost ([127.0.0.1]:41298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8RZ0-0001JF-Ns for submit@debbugs.gnu.org; Thu, 21 Feb 2013 03:31:35 -0500 Original-Received: from mail-la0-f41.google.com ([209.85.215.41]:42357) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U8RYw-0001J4-2D for 13743@debbugs.gnu.org; Thu, 21 Feb 2013 03:31:33 -0500 Original-Received: by mail-la0-f41.google.com with SMTP id fo12so8539658lab.28 for <13743@debbugs.gnu.org>; Thu, 21 Feb 2013 00:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=f7xDLoO5al2NXM3srCpMQRdcby3d64uGq1Kdcl/Zpf8=; b=LG+k/i/6HUGJV6rPbSYpcwY/5h88RF9WMeVcD4vRjf6iMGSeCz11mwElJEUt6u1ige xb9BWS089xaIH1H7df0LZg5MmWAz/uSAPOUaeIwBLn/U8HGoSCyP5ty6Hq/Rhg/i5Gen QE6OYPq3Nnbq+XpB/n8yAoih9N1WcERPWb6octOJ+443Ht+RYaxRI5+XOBr43XFHSx+l C+Sue6zPTZMcOyzWptc6daUkythsAtsj3rYWAaD35Y8BUtQ1A9QQWyxheaGoI33mMX/+ YyLynpGsdDWY/zAIMlbeN0QBme4qRVCuAb6FaD6Ij4HulIs+QCA35ds8ayLsDFejBcbJ yCVw== X-Received: by 10.152.147.36 with SMTP id th4mr20480130lab.19.1361435412907; Thu, 21 Feb 2013 00:30:12 -0800 (PST) Original-Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id hk10sm10438177lab.4.2013.02.21.00.30.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 21 Feb 2013 00:30:11 -0800 (PST) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: <83ehgaok86.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:71586 Archived-At: This is a multi-part message in MIME format. --------------070200020801040400020506 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 20.02.2013 23:31, Eli Zaretskii wrote: > Thanks. This shows quite a different story. But the backtrace alone > is not enough to figure out what goes wrong in this scenario and why, > at least not for me (and I don't see anyone else jumping in to dig > into this problem). And since reproducing this involves tricky Thanks for looking into this, but I'd like to emphasize that so far I've only seen this bug on GNU/Linux. > non-default setup and an external package, I wonder if you could > provide a recipe starting with "emacs -Q" or with a minimal .emacs > init file, and show every command you type to reproduce the crash? Here's the recipe: 1. Have case2.html.erb saved somewhere (attached). The contents of the file are somewhat important, and also its length: if I delete the "sparta" line - no bug. 2. Check out this repository: https://github.com/purcell/mmm-mode 2. Open the test file in some Emacs instance, make a modification (prepend the first line with some spaces, for example). Don't save it. 3. Open a new Emacs instance (-Q). I'd recommend doing it with branch emacs-24, since trunk currently has some problems with font-lock (Bug#13751). 4. Paste the following into *scratch* and evaluate it: (add-to-list 'load-path "path/to/mmm-mode") (require 'mmm-auto) (require 'mmm-erb) (setq mmm-global-mode 'auto) (mmm-add-mode-ext-class 'html-erb-mode "\\.html\\.erb\\'" 'erb) (mmm-add-mode-ext-class 'html-erb-mode nil 'html-js) (mmm-add-mode-ext-class 'html-erb-mode nil 'html-css) (add-to-list 'auto-mode-alist '("\\.html\\.erb\\'" . html-erb-mode)) 5. Open the test file, it will tell you that the file is locked. 6. Press `s' or `p'. See it crash. --------------070200020801040400020506 Content-Type: text/html; name="case2.html.erb" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="case2.html.erb" <% @items.each do |a| %> <% if a.phooey? %> <%= a.borg %> <% else %> <%= a.blarg %> <% end %> <% end %> spartaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa --------------070200020801040400020506--