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: Build failure for Emacs master Date: Thu, 14 Apr 2016 09:06:03 -0700 Organization: UCLA Computer Science Department Message-ID: <570FBFEB.90803@cs.ucla.edu> References: <56CCD91E.6070507@alice.it> <83egc2ixji.fsf@gnu.org> <56CD798D.7060102@alice.it> <56CD8408.1000701@alice.it> <83wppuggb4.fsf@gnu.org> <56CE2CA7.5050906@alice.it> <83io1cg2pt.fsf@gnu.org> <56DA0327.2030009@alice.it> <83oaatxu72.fsf@gnu.org> <570C4307.6050907@alice.it> <83k2k2g82s.fsf@gnu.org> <86egaa7b0z.fsf@gmail.com> <83a8kyfd38.fsf@gnu.org> <86lh4hm7dd.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080302020002010501040800" X-Trace: ger.gmane.org 1460650005 18911 80.91.229.3 (14 Apr 2016 16:06:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Apr 2016 16:06:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Phillip Lord , Andy Moreton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 14 18:06:37 2016 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 1aqjmu-00078m-1E for ged-emacs-devel@m.gmane.org; Thu, 14 Apr 2016 18:06:36 +0200 Original-Received: from localhost ([::1]:42344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjmp-0004H5-H9 for ged-emacs-devel@m.gmane.org; Thu, 14 Apr 2016 12:06:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjmV-00049D-8q for emacs-devel@gnu.org; Thu, 14 Apr 2016 12:06:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqjmQ-0005gc-8c for emacs-devel@gnu.org; Thu, 14 Apr 2016 12:06:11 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqjmP-0005g8-Vr for emacs-devel@gnu.org; Thu, 14 Apr 2016 12:06:06 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CCA14160E69; Thu, 14 Apr 2016 09:06:04 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id cPugaiwCTRRb; Thu, 14 Apr 2016 09:06:04 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 085E316120B; Thu, 14 Apr 2016 09:06:04 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6X0r514WiMTA; Thu, 14 Apr 2016 09:06:03 -0700 (PDT) Original-Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id DC18F160E69; Thu, 14 Apr 2016 09:06:03 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:202910 Archived-At: This is a multi-part message in MIME format. --------------080302020002010501040800 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 04/14/2016 12:32 AM, Phillip Lord wrote: > I also have both Andy and Angelo's build > failures working (er, failing) reproducibly now. It also appears that my > autoload patch on master is causing a build failure (only on windows). > > If no one solves it first, I will bisect this as soon as possible, but in > practice this is likely to be next week. If you're right then there must be at least two bugs, right? Your autoload patch is only on master, but people are also reporting problems in the emacs-25 branch. I am suspicious of copy-file. Why does it copy files possibly in text mode on MS-Windows, while truncating based on byte counts? That sounds like a recipe for trouble, as the miscount could cause file "truncation" to instead append a bunch of null bytes, which sounds like the symptoms you're observing. Does the attached patch work around one of the bugs for you? This patch shouldn't affect behavior on GNUish or POSIXish hosts. --------------080302020002010501040800 Content-Type: text/x-patch; name="fileio.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fileio.diff" diff --git a/src/fileio.c b/src/fileio.c index dfab3de..69aa3f6 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1929,7 +1929,7 @@ permissions. */) } #else /* not WINDOWSNT */ immediate_quit = 1; - ifd = emacs_open (SSDATA (encoded_file), O_RDONLY, 0); + ifd = emacs_open (SSDATA (encoded_file), O_RDONLY | O_BINARY, 0); immediate_quit = 0; if (ifd < 0) @@ -1963,15 +1963,15 @@ permissions. */) new_mask = S_IREAD | S_IWRITE; #endif - ofd = emacs_open (SSDATA (encoded_newname), O_WRONLY | O_CREAT | O_EXCL, - new_mask); + ofd = emacs_open (SSDATA (encoded_newname), + O_WRONLY | O_CREAT | O_EXCL | O_BINARY, new_mask); if (ofd < 0 && errno == EEXIST) { if (NILP (ok_if_already_exists) || INTEGERP (ok_if_already_exists)) barf_or_query_if_file_exists (newname, true, "copy to it", INTEGERP (ok_if_already_exists), false); already_exists = true; - ofd = emacs_open (SSDATA (encoded_newname), O_WRONLY, 0); + ofd = emacs_open (SSDATA (encoded_newname), O_WRONLY | O_BINARY, 0); } if (ofd < 0) report_file_error ("Opening output file", newname); --------------080302020002010501040800--