lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RE: [lwip-devel] [bug #27034] Invalid ASSERT in pbuf_alloc()


From: Simon Goldschmidt
Subject: Re: RE: [lwip-devel] [bug #27034] Invalid ASSERT in pbuf_alloc()
Date: Thu, 16 Jul 2009 07:49:46 +0200

> >the PPP code is
> >unfortunately not very actively maintained and thus may (beside this
> >one) contain other bugs or invalid code: lines like
> >
> >      *((u_char*)nb->payload + nb->len++) = PPP_ESCAPE;
> 
> Ppp may not be the best example code, but if it works at least it's usable
> to some.  Now that you said this, how will you explain that invalid or
> buggy code (or illegal use of internal data) is used in production code in
> CVS? :-)

It's sad, but of course the simple reason is: noone seems to care! If I'm not 
mistaken, currently there are four more or less active developers working on 
lwIP (with CVS write access). None of them is using PPP! There seem to be users 
wanting a stable PPP-on-lwIP but noone seems to care enough to maintain it. And 
I don't see a reason to allow zero-length pbufs throughout the stack only 
because PPP needs it.

Alain Moulette wrote:
> I would like to remind that *doing something useless is not a bug*.

Zero-length pbufs have in the past been caused by multiple concurrent threads 
in the lwIP code, for example, so it is desireable to not allow them to 
prevent/detect a crash as soon as possible.

> Ppp is too complex to mantain but it is good quality code and works fine

It does, to some extent, but the 'good quality code' from BSD is not 
everything: the part around the zero length pbuf must have been written from 
scratch while porting to lwIP.

Anyway, I'm OK with changing the assert for 1.3.1 (since any other change is 
too big a change at this stage), but I'm still not OK with allowing zero-length 
pbufs.

Simon
-- 
Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02




reply via email to

[Prev in Thread] Current Thread [Next in Thread]