From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Bug in filelock.c Date: Sat, 23 Feb 2013 16:25:16 -0800 Organization: UCLA Computer Science Department Message-ID: <51295DEC.1010808@cs.ucla.edu> References: <83zjyukfxe.fsf@gnu.org> <51291AFF.2000602@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361665538 7774 80.91.229.3 (24 Feb 2013 00:25:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Feb 2013 00:25:38 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 24 01:25:59 2013 Return-path: Envelope-to: ged-emacs-devel@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 1U9PPW-0002Gj-V1 for ged-emacs-devel@m.gmane.org; Sun, 24 Feb 2013 01:25:47 +0100 Original-Received: from localhost ([::1]:48632 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9PPC-00018l-Ax for ged-emacs-devel@m.gmane.org; Sat, 23 Feb 2013 19:25:26 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9PP8-00018T-4H for emacs-devel@gnu.org; Sat, 23 Feb 2013 19:25:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9PP6-0005Uq-6K for emacs-devel@gnu.org; Sat, 23 Feb 2013 19:25:22 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:41182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9PP4-0005UY-FO; Sat, 23 Feb 2013 19:25:18 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id A802BA60003; Sat, 23 Feb 2013 16:25:17 -0800 (PST) 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 QGmHpt5s7noM; Sat, 23 Feb 2013 16:25:16 -0800 (PST) Original-Received: from [192.168.1.9] (pool-71-189-154-249.lsanca.fios.verizon.net [71.189.154.249]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id DBB88A60002; Sat, 23 Feb 2013 16:25:16 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:157284 Archived-At: On 02/23/2013 01:59 PM, Andreas Schwab wrote: > It worked perfectly well until about 8 months ago. Thanks, I installed the following patch to the emacs-24 branch and I assume this fix will propagate into the trunk. I still don't see the need for that extra business with using '.#FOO.1' as the lock file name if a file '.#FOO' happens to exist and is not a symbolic link. How about if we remove that stuff (in the trunk)? Isn't it a waste of a system call for something nobody should need? ---- Fix regression introduced by July 10 filelock.c patch. * filelock.c (fill_in_lock_file_name): Fix crash caused by the 2012-07-10 patch to this file. Reported by Eli Zaretskii in and diagnosed by Andreas Schwab in . === modified file 'src/filelock.c' --- src/filelock.c 2013-01-01 09:11:05 +0000 +++ src/filelock.c 2013-02-24 00:16:45 +0000 @@ -316,7 +316,7 @@ p[1] = '.'; p[2] = '#'; - p = p + length + 2; + p = lockfile + length + 2; while (lstat (lockfile, &st) == 0 && !S_ISLNK (st.st_mode)) {