Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 Feb 2013 18:08:39 +0100
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 2/3] Have different definitions of
 __pthread_tsd_main agree in size

* Jens Gustedt <jens.gustedt@...ia.fr> [2013-02-11 17:30:23 +0100]:
> Am Montag, den 11.02.2013, 15:39 +0100 schrieb Szabolcs Nagy:
> > * Jens Gustedt <jens.gustedt@...ia.fr> [2013-02-11 15:07:28 +0100]:
> > > So it would at least be good that the internal use of it in musl would
> > > be consistent and the C library would not see two distinct objects.
> > > 
> > 
> > no
> 
> I take it that this "no" is only for the second part of the
> assertion, and that you would subscribe to the shortend phrase
> 
>    So it would at least be good that the internal use of it in musl
>    would be consistent.
> 
> If it is stated in POSIX that a userspace environ is a different
> object from the one in the library, I am perfectly fine with
> that. Documented behavior is a good thing, and userspace should see
> its environ.
> 
> As it is currently, without my patch, execv would see __environ and
> execvp would see the user space environ. I am still convinced that
> this isn't desirable, both should see __environ, and that is what I
> meant with my subphrase "and the C library would not see two distinct
> objects".
> 

you are right

execv and execvp should consistently use __environ

it seems execvp was changed to fix a bug in posix_spawn
but that's no longer relevant with the new implementation

" fix parent-memory-clobber in posix_spawn (environ)"

btw system uses environ but internal/libc.h defines environ
to be __environ, i think that's hideous

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.