This is the mail archive of the
mailing list for the Cygwin project.
Re: ld randomly assigns wrong user and group IDs to executable
- From: Andrew Schulman <schulman dot andrew at epa dot gov>
- To: cygwin at cygwin dot com
- Date: Fri, 22 Apr 2016 14:08:23 -0400
- Subject: Re: ld randomly assigns wrong user and group IDs to executable
- Authentication-results: sourceware.org; auth=none
- References: <uqmkhb9kmv244kd755urqpunns6qk6gbe2 at 4ax dot com>
> 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
> * 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
> * It only happens with this one program - other tests in configure work
> * 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
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple