posix_spawn issues on i686

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jan 12 11:24:21 GMT 2022


On Jan 12 11:41, Corinna Vinschen wrote:
> On Jan 11 16:08, Ken Brown wrote:
> > On 1/11/2022 1:45 PM, Jeremy Drake via Cygwin wrote:
> > > Sorry, I am not subscribed to the list so don't have the message to reply
> > > to for threading purposes, but attached please find a C reproducer that
> > > works on x86_64 but fails on i686.  The particular issue seems to be the
> > > POSIX_SPAWN_RESETIDS flag - not setting that allows i686 to succeed too.
> 
> Thanks for the STC, Jeremy!
> 
> > I don't have time to check this carefully, but it looks to me like the
> > problem is that process_spawnattr calls setegid and seteuid instead of
> > setegid32 and seteuid32.  This causes truncation of the gid and uid.
> 
> You're right.  Additionally the calls to getgid and getuid have to use
> the internal getgid32 and getuid32 functions.
> 
> I'll apply a fix.

New developer snapshot is up at https://cygwin.com/snapshots/
Please test.


Thanks,
Corinna


More information about the Cygwin mailing list