lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Possibly falsely triggered LWIP_ASSERT?


From: Kieran Mansley
Subject: Re: [lwip-devel] Possibly falsely triggered LWIP_ASSERT?
Date: Tue, 29 Sep 2009 11:27:53 +0100

On Fri, 2009-09-25 at 14:41 -0400, Bill Auerbach wrote:
> In pbuf_realloc, the LWIP_ASSERT:
> 
>     LWIP_ASSERT("pbuf_realloc: q != NULL", q != NULL);
> 
> can be triggered falsely (or is it something prior that needs a
> check?).  I have a pbuf with no next.
> 
> p->tot_len is 1064
> 
> p->len is 46
> 
> p->next is NULL
> 
> new_len is 1028
> 
> grow is -36
> 
> so rem_len > q->len is true entering the while loop, but with q->next
> == NULL, it asserts.
> 
> The call came from ip_input.  iphdr_len is 1028.  Is this valid?  If
> not, should pbuf_realloc have even been called?

The odd bit is that p->next is NULL, so I think the assertion might be
noticing a real problem.  You have p->len at 46 and p->tot_len at 1064,
so this suggests a chain of pbufs, and we would naturally expect p->next
to be the next thing in the chain.  Where exactly is the call being made
from ip_input?  The other possibility is it's trying to shrink the tail
of the packet, but I can't think off the top of my head why it would
want to do that.

Kieran





reply via email to

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