This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Variable scope issue in confstr
On 26/03/12 00:01, Carlos O'Donell wrote:
> On Sat, Mar 24, 2012 at 11:00 PM, Allan McRae <allan@archlinux.org> wrote:
>> In confstr (posix/confstr.c), the variable restenvs is defined within a
>> swtich case block and then used outside the switch statement (via
>> assignment to the variable string). Issues with this are exposed with
>> gcc-4.7 and -O2.
>>
>>
>> 2012-03-25 Allan McRae <allan@archlinux.org>
>>
>> * posix/confstr.c: fix variable scope issue.
>
> What testing did you do?
I ran "make check" on i686-pc-linux-gnu and x86_64-unknown-linux-gnu and
there were no regressions. I also made sure the patch worked by
checking the file names in the getconf directory no longer had random
characters in them (which is how I spotted the issue).
> Can we add a regression test for this please?
I have no idea how to add a regression test for this issue...
Allan