[RFC] git master broken due to config parser

Natanael Copa natanael.copa at gmail.com
Tue Oct 5 08:14:49 UTC 2010


Hi,

The git master have been more or less rock stable since NPTL branch
was merged in (at least for x86).

Until the config parser commits.

The problems are:
* memory corruption due to assuming realloc returns same address as
before. Patches was sent to this list. [1] [2]
* endless loop in getservbyname when service is not known. Patch was sent [3].
* lines in /etc/protocols and /etc/services (and others?) longer than
80 chars still gives "interesting" restults. The logic for the realloc
when buffer is too small in getserv*() and getproto*() is flawed and
just don't work. (i can give details if someone is interested)
* memory leaks when calling getservent(), getservbyname() and
getservbyport() multiple times. (fairly simple to fix)
* if you have comments with more than MAXALIASES words "interesting"
things might happen

Now, I think breaking git master temporary is ok. Its an acceptable
price to pay for progress. I think its also ok that developers gets
busy with other stuff and don't have time to give uclibc 100%
attention. That happens to all.

However, its not good that git master stays broken.

So, I have a few options I think we should evaluate:

1. Revert the config parser commits, create a feature branch and put
them there, where they can be debugged without stress.

2. Raise the line buffer size to 256 chars, which it seems to have
been before. (things that still break at that size would probably have
broken before too). Then rip out the code that tries to be smart by
doing realloc when line buffer is too small.

3. Keep line buffer to 80 chars and fix the realloc logic, now.

Option #2 and #3 implies that the patches[1][2][3] gets applied.

I have some ideas for option #3, but not sure yet if it will work. The
code will be somewhat complicated so I think the extra bytes saved
might get lost in the extra code.

In any case, I think we should do something *soon*, since current git
master have been broken for too long. I can help but i need someone to
review (sign-off?) and someone with git push access to get the changes
in git master.

Thanks!

-- 
Natanael Copa

[1] http://lists.uclibc.org/pipermail/uclibc/2010-September/044314.html
[2] http://lists.uclibc.org/pipermail/uclibc/2010-September/044317.html
[3] http://lists.uclibc.org/pipermail/uclibc/2010-September/044316.html


More information about the uClibc mailing list