From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ota, Takaaki" Newsgroups: gmane.emacs.bugs Subject: bug#22795: 25.0.91; Can't write read only file on w32 Date: Mon, 29 Feb 2016 09:53:54 -0800 Message-ID: <20160229.095354.534976457.Takaaki.Ota@am.sony.com> References: <83si0fcf4y.fsf@gnu.org> <20160229.084035.77911664.Takaaki.Ota@am.sony.com> <83h9gr8mns.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1456768522 28574 80.91.229.3 (29 Feb 2016 17:55:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Feb 2016 17:55:22 +0000 (UTC) Cc: 22795@debbugs.gnu.org To: Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 29 18:55:10 2016 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 1aaS2H-0004OE-Oi for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 18:55:09 +0100 Original-Received: from localhost ([::1]:38141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaS2H-000648-8w for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Feb 2016 12:55:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaS2E-00062D-5H for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 12:55:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaS2A-0003t9-TB for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 12:55:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaS2A-0003t0-PZ for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 12:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aaS2A-00023N-Fx for bug-gnu-emacs@gnu.org; Mon, 29 Feb 2016 12:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Ota, Takaaki" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Feb 2016 17:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22795 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22795-submit@debbugs.gnu.org id=B22795.14567684467807 (code B ref 22795); Mon, 29 Feb 2016 17:55:02 +0000 Original-Received: (at 22795) by debbugs.gnu.org; 29 Feb 2016 17:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:53967 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaS1G-00021q-Dt for submit@debbugs.gnu.org; Mon, 29 Feb 2016 12:54:06 -0500 Original-Received: from mail-bl2on0056.outbound.protection.outlook.com ([65.55.169.56]:15424 helo=na01-bl2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aaS1E-00021M-RU for 22795@debbugs.gnu.org; Mon, 29 Feb 2016 12:54:05 -0500 Original-Received: from CY1PR0801CA0008.namprd08.prod.outlook.com (10.163.136.146) by BL2PR08MB532.namprd08.prod.outlook.com (10.141.94.145) with Microsoft SMTP Server (TLS) id 15.1.415.20; Mon, 29 Feb 2016 17:53:58 +0000 Original-Received: from BN1AFFO11FD050.protection.gbl (2a01:111:f400:7c10::198) by CY1PR0801CA0008.outlook.office365.com (2a01:111:e400:5312::18) with Microsoft SMTP Server (TLS) id 15.1.415.20 via Frontend Transport; Mon, 29 Feb 2016 17:53:58 +0000 Authentication-Results: spf=pass (sender IP is 160.33.194.228) smtp.mailfrom=am.sony.com; gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=bestguesspass action=none header.from=am.sony.com; Received-SPF: Pass (protection.outlook.com: domain of am.sony.com designates 160.33.194.228 as permitted sender) receiver=protection.outlook.com; client-ip=160.33.194.228; helo=usculsndmail01v.am.sony.com; Original-Received: from usculsndmail01v.am.sony.com (160.33.194.228) by BN1AFFO11FD050.mail.protection.outlook.com (10.58.53.65) with Microsoft SMTP Server (TLS) id 15.1.422.5 via Frontend Transport; Mon, 29 Feb 2016 17:53:57 +0000 Original-Received: from usculsndmail14v.am.sony.com (usculsndmail14v.am.sony.com [146.215.230.105]) by usculsndmail01v.am.sony.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1THruMf026582; Mon, 29 Feb 2016 17:53:56 GMT In-Reply-To: <83h9gr8mns.fsf@gnu.org> X-Mailer: Mew-6.6 on Emacs-25.0.91.2 (i686-pc-mingw32 built on 2016-02-17) X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CPI:160.33.194.228; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(199003)(24454002)(189002)(5423002)(15975445007)(87936001)(1096002)(586003)(1220700001)(11100500001)(2906002)(23726003)(5008740100001)(189998001)(2351001)(230700001)(86362001)(103116003)(106466001)(6806005)(5003600100002)(104016004)(19580395003)(19580405001)(50226001)(47776003)(110136002)(46406003)(92566002)(2950100001)(97756001)(50986999)(76176999)(5001960100003)(81156008); DIR:OUT; SFP:1101; SCL:1; SRVR:BL2PR08MB532; H:usculsndmail01v.am.sony.com; FPR:; SPF:Pass; MLV:sfv; A:0; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD050; 1:PWuHEU/bIw6rT7w640AwtYXNWNGP4pW7KA79rToLGgLAPxcofgb7P9TryAQEggX3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lRbtb+52YbmG8ykxTnk0ubvtPpzUQAczdvgSG9Ma7OgruNGllxvocOEWOcoZW8Sz229wJvfZ6kftUmGjSLQGUpF//3xARbnjm86gVeHz7TQegf7FNU+mjC4zGVu/3n2A== X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(8251501001); SRVR:BL2PR08MB532; X-MS-Office365-Filtering-Correlation-Id: ee9a3106-39db-4ddf-c6b7-08d341314c67 X-Microsoft-Exchange-Diagnostics: 1; BL2PR08MB532; 20:RpK2fRHDILHz1WhSu6F8iYptSclRVfDkNgMMspXzwkDJ8z3ZHRewtf7hzMjo+1sLoOSAFt6X2vt5eIjZ5z19aIcTO+KvUDCD9fz9I7DXBnZJWRlO00Y7n03gr1PxVQssEnomPX7VJMDjwX/KrVv76bgyUeAi9n03nAIt/8CNz+PrTCJHY+DZ5PSiwM3yiyOKYFXOeRr4nnRsg7vzArpid1t2kmEl4NQs7KJcmjraXXOLL/RHUWJw7TmsiXm4USE/JoPZ/wUnLipaQ4m1jdGanZntIyJCg0bNvbWkgd+bVnKGIUbNlVC51byq2gT6GdDeBItOiRxwkTHGJA6l/E3uIauM6+rZ5RBKKQNZMdUm1dB8QmbC+ePIRs0KqH56L9nA2pPE9Iaog8btF+PyeDj2fchMZd4GDtTWg9LLhOldNWoBZhoR8EprGGWEog3KsedcRnIo7sCgK1lL6ZXncG5rOcdzVh6DGTR6oMhPz6cMqwkYev7F5MQ5uY7fBXSjwXIL X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(255870821582301); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13023025)(13015025)(13018025)(13024025)(13017025)(3002001)(10201501046); SRVR:BL2PR08MB532; BCL:0; PCL:0; RULEID:; SRVR:BL2PR08MB532; X-Microsoft-Exchange-Diagnostics: 1; BL2PR08MB532; 4:ztRsvvISfhqw3d72ON33dkgYxyW8niCiR743rrwonVaY0Stok81L9m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ixVT63CuRvDD76WFDkVmGvlpNOsPY2nnPX1nPDOrx8zAL0xrUr/gsv1M0fuObPoI6CKo7hN8qY1WvuY4sIpin0kPS85qR63cTD1DvO0P82Hxg6pBxk7u3EMV7ISPSxLYX2hNZStTKzeojtj1cbvxfS84mFPdlfEvWyvrfYKDJYsh8X54CigkuorYeIXKi+UQ/SaaSJTtGpc8dkY8LASN2Nv2vF0K3ygT4wBfMgBOapycd 0I3LUXYfDtqaOx3BbdlGCAp+wxNAtgPI4WU1zlyvzTQG5X5 X-Microsoft-Exchange-Diagnostics: 1; BL2PR08MB532; 5:g0qUjGdifELCsVuMLAZMVgvzkFcz2cUe9nZBjybcD/KVBlM5ppUL4D6BXcWwSBBYa3Yl3imHBR1B2o9f0qZMV6/cYsTPc+hPCkrtImpKtbV+6YxSj1x6k37iRGpRoOD+VrN4Kao/ipjCqWLR7djXAA==; 24:Z8RIBrcWDueKQeFKbByg1N2ifeXLS07iLPWRus1UdWg1OWjXvGLdhFhnYTbjUWTEy0LJPKdqz7z2GL81wcB13yU6/ckdd5QXE59aiF0pLdI= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: am.sony.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Feb 2016 17:53:57.9040 (UTC) X-MS-Exchange-CrossTenant-Id: 86f99b1e-a08b-4313-8c0c-2258d53da610 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=86f99b1e-a08b-4313-8c0c-2258d53da610; Ip=[160.33.194.228]; Helo=[usculsndmail01v.am.sony.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR08MB532 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:114150 Archived-At: Mon, 29 Feb 2016 19:13:43 +0200: Eli Zaretskii wrote: > > Date: Mon, 29 Feb 2016 08:40:35 -0800 > > CC: <22795@debbugs.gnu.org> > > From: "Ota, Takaaki" > > > > I am now very much puzzled. Here is the trace up to _wopen(). I > > printed parameters to _wopen() and they are identical yet one succeeds > > and the other fails. > > Hmm... strange, indeed. > > Do you have a dependency walker program? (If not, you can download it > from http://www.dependencywalker.com/.) Can you tell whether the two > executables differ in the versions of msvcrt.dll they are linked > against? Or any other dynamic libraries, for that matter? > > Also, what is the value of errno after the _wopen call that fails? 4303 res = _wopen (mpath_w, (oflag & ~_O_CREAT) | _O_NOINHERIT, mode); (gdb) s 4304 if (res < 0) (gdb) p res $6 = -1 (gdb) p errno $7 = 13 So it must be this. #define EACCES 13 /* Permission denied */ > > Finally, what about this part of my questions, did you look into this: > > > Also, I think by the time this code is run, the original file should > > have been renamed to the backup-file name, so the file you are saving > > should not exist on disk by the time we open it. If that is not the > > case with 25.0.91, then perhaps what fails is not the open call, but > > the rename call before that. > > Does the file that Emacs tries to open here, c:\d\ota\memo, exist when > _wopen is called, and if so, is it read-only? Please check this with > both versions of Emacs, and see if there's any differences in what > happens. In both cases the original file exists right before calling _wopen() but there is a difference. On 25.0.91 the file remains read-only but on 24.5 the file is writable right before calling _open(). Now we have some clue here. -Tak