This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] Error on setenv(..., NULL, ...)
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Paul Pluzhnikov <ppluzhnikov at google dot com>, Szabolcs Nagy <szabolcs dot nagy at arm dot com>, Joseph Myers <joseph at codesourcery dot com>, GLIBC Devel <libc-alpha at sourceware dot org>, "mtk at man7 dot org" <mtk at man7 dot org>
- Date: Thu, 12 Mar 2015 14:53:14 -0700 (PDT)
- Subject: Re: [patch] Error on setenv(..., NULL, ...)
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobNSbWUkd_i-L6U0ovbqPYnJY-h=ftX1K61yb19pmJj6aw at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1503111712240 dot 30954 at digraph dot polyomino dot org dot uk> <CALoOobPKxfJfnbcUKH8osgCZMeSiD83K1OiF+_vSeAy0ewe1Jw at mail dot gmail dot com> <55008721 dot 1090200 at arm dot com> <CALoOobNbOgm5=oFbEUmTbca3M-KqSUgGmTeWYOt1zTN-CTLoog at mail dot gmail dot com> <55008DE0 dot 8050805 at cs dot ucla dot edu>
I like Eggert's approach. Off hand it seems it would be better to simply
move the definition of VALLEN into the scope containing its uses, which is
the else branch of 'if (combined != NULL)'. The only reason I can see not
to do that is to force the fault to be before the lock is taken. If that
is the explicit intent of the code, then its comments should say so.
- References:
- [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)
- Re: [patch] Error on setenv(..., NULL, ...)