ld randomly assigns wrong user and group IDs to executable

Andrew Schulman schulman.andrew@epa.gov
Fri Apr 22 19:28:00 GMT 2016


> 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



More information about the Cygwin mailing list