From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49801 invoked by alias); 22 Apr 2016 18:08:36 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 49788 invoked by uid 89); 22 Apr 2016 18:08:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:uqmkhb9 X-HELO: plane.gmane.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 22 Apr 2016 18:08:34 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1atfVG-0005TB-SQ for cygwin@cygwin.com; Fri, 22 Apr 2016 20:08:31 +0200 Received: from c-69-140-37-22.hsd1.md.comcast.net ([69.140.37.22]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Apr 2016 20:08:30 +0200 Received: from schulman.andrew by c-69-140-37-22.hsd1.md.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Apr 2016 20:08:30 +0200 To: cygwin@cygwin.com From: Andrew Schulman Subject: Re: ld randomly assigns wrong user and group IDs to executable Date: Fri, 22 Apr 2016 19:28:00 -0000 Message-ID: <0ppkhbp6p8od6tgn3gll4cksvfn530c0e1@4ax.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg00573.txt.bz2 > During configure, a particular c++ program compiles fine, but the generated > executable has the wrong user and group IDs and permissions, so the > configure test fails and my build fails. > > Here are the source files and generated executable: > > $ ls -l conftest* > -rw-r--r-- 1 ASchulma Domain Users 1911 Apr 22 13:11 conftest.cpp > -rw-r--r-- 1 ASchulma Domain Users 466 Apr 22 13:11 conftest.err > -rwxr-x--- 1 Unknown+User Unknown+Group 62152 Apr 22 13:11 conftest.exe > > $ ls -ln conftest.exe > -rwxr-x--- 1 4294967295 4294967295 62152 Apr 22 13:11 conftest.exe > > Note the strange, apparently random user and group ID numbers for > conftest.exe. > > * This happens about half the time. The other half of the time, the user > and group IDs are mine and so the build succeeds. I haven't been able to > figure out when it will fail. > > * The user and group IDs are always the same, 4294967295, when the problem > happens. > > * It only happens with this one program - other tests in configure work > fine. > > * When I compile the program on my own, outside of configure, it builds > fine, two compiler warnings aside. A few more notes: * As Sergio Gomez points out, the ID 4294967295 isn't random but is 2^32-1. * Configure is now starting to fail on other tests, in exactly the same way: by generating an executable with those IDs that I then can't read, causing the test to fail. Again it seems to be random which test fails and when. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple