svn commit: trunk/uClibc/libc/unistd

Denys Vlasenko vda.linux at googlemail.com
Fri Jun 6 03:19:05 UTC 2008


On Friday 06 June 2008 03:09, Denys Vlasenko wrote:
> Hi Bernd
> 
> On Thursday 05 June 2008 19:40, Bernd Schmidt wrote:
> > > Log:
> > > getopt: do not needlessly use static structure.
> > > Reorder structure members and change some of them into smallints
> > > to reduce bss and text:
> > >     text    data    bss   dec     hex filename
> > > -   2403    12       40   2455    997 libc/unistd/getopt.o
> > > +   2252    12        0   2264    8d8 libc/unistd/getopt.o
> > > 
> > > Modified:
> > >    trunk/uClibc/libc/unistd/getopt.c
> > >    trunk/uClibc/libc/unistd/getopt_int.h
> > 
> > So, after about a day of bisecting and rebuilding stuff I've found that 
> > this is the patch that stops my Blackfin board from booting normally 
> > when using an updated version of uClibc.
> > 
> > This patch shows a complete lack of understanding of the getopt 
> > interface (note: getopt is called several times in a row, so we can't 
> > clear the internal data on each call).  Reading the code at the start of 
> > _getopt_internal_r should have made that plain.  The patch also can't 
> > possibly have been tested.  I'm reverting it.
> 
> I feel ashamed. I caused far too much breakage in recent time
> than I did good things. Have to do much better than that.
> 
> Sorry. :(

I added some machinery to my uclibc build system so that I can run
both uclibc testsuite and also a busybox testsuite against freshly
built uclibc. I checked that it would have caught my blunder
in getopt, had I created the system earlier.

Found and fixed one false positive in uclibc testsuite. I see some
other problems there, will take a look a bit later.

I returned to getopt and did some shrinking, and tested it this time
by running busybox testsuite (which uses tons of getopt calls).
Will commit it in a fw minutes.

Sorry again for my sloppy work earlier.
--
vda



More information about the uClibc mailing list