From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#16986: Crash when idle Date: Sat, 02 Aug 2014 16:11:08 -0700 Organization: UCLA Computer Science Department Message-ID: <53DD700C.70808@cs.ucla.edu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070202030009060809080301" X-Trace: ger.gmane.org 1407021149 18590 80.91.229.3 (2 Aug 2014 23:12:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Aug 2014 23:12:29 +0000 (UTC) Cc: Dmitry Antipov , Simon Carter To: 16986@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Aug 03 01:12:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XDiTK-0000GT-Kp for geb-bug-gnu-emacs@m.gmane.org; Sun, 03 Aug 2014 01:12:18 +0200 Original-Received: from localhost ([::1]:46113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDiTK-0007bO-1J for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Aug 2014 19:12:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDiTB-0007aG-5O for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2014 19:12:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDiT5-0001Yp-3v for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2014 19:12:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48384) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDiT5-0001Yg-03 for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2014 19:12:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XDiT4-0003xf-Cx for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2014 19:12:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Aug 2014 23:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16986 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 16986-submit@debbugs.gnu.org id=B16986.140702108415174 (code B ref 16986); Sat, 02 Aug 2014 23:12:02 +0000 Original-Received: (at 16986) by debbugs.gnu.org; 2 Aug 2014 23:11:24 +0000 Original-Received: from localhost ([127.0.0.1]:55327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDiSR-0003wf-HC for submit@debbugs.gnu.org; Sat, 02 Aug 2014 19:11:23 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:34779) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XDiSO-0003wO-Ma for 16986@debbugs.gnu.org; Sat, 02 Aug 2014 19:11:21 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 755F7A60004; Sat, 2 Aug 2014 16:11:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yR7OqNTGrPkJ; Sat, 2 Aug 2014 16:11:09 -0700 (PDT) Original-Received: from [192.168.1.9] (pool-108-0-233-62.lsanca.fios.verizon.net [108.0.233.62]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 897F839E801D; Sat, 2 Aug 2014 16:11:09 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92063 Archived-At: This is a multi-part message in MIME format. --------------070202030009060809080301 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Thanks, Mitsuharu, for the diagnosis; I think you nailed it. Dmitry, I spotted a couple of problems with that patch. First, any compiler could do that optimization and I wouldn't be surprised if some version of GCC does it either now or in the future, so the fix shouldn't be conditionalized on __clang__. Second, making 'directory' itself volatile would break the (uncommon) case where GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS, because one can't portably assign the address of a volatile to a pointer that isn't volatile-qualified. Plus, there's no need to have every access to that local be volatile; we need only ensure that the value is stored somewhere. I installed the attached patch as emacs-24 bzr 117421, as a change that should not break anything and most likely fixes the bug. Please let me know how it works in the Clang environment. --------------070202030009060809080301 Content-Type: text/plain; charset=UTF-8; name="dired.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="dired.patch" PT09IG1vZGlmaWVkIGZpbGUgJ3NyYy9DaGFuZ2VMb2cnCi0tLSBzcmMvQ2hhbmdlTG9nCTIw MTQtMDgtMDIgMjE6MzE6MTggKzAwMDAKKysrIHNyYy9DaGFuZ2VMb2cJMjAxNC0wOC0wMiAy Mjo1NzoxMyArMDAwMApAQCAtMSw1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