[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Is LWIP_SUPPORT_CUSTOM_PBUF functionality proper ?
From: |
Simon Goldschmidt |
Subject: |
Re: [lwip-users] Is LWIP_SUPPORT_CUSTOM_PBUF functionality proper ? |
Date: |
Wed, 9 Nov 2016 12:18:34 +0100 |
Arpit Agarwal wrote:
> But Still I am unable to figure out Why Assertion fails happen or in which
> scenario it can happen.
Assertions are included in the code at various places to ensure data is as
expected.
The "custom_free_function" pointer is stored in RAM so even if initialized it
can be set to NULL
at some point. Being like that, I don't really understand your question, and
this might be
why noone answered.
If you happen to set the "custom_free_function" pointer to NULL (how that
happens
doesn't matter), you most probably will get a NULL pointer exception and this
assertion gives a better error message.
Oh, and in the special case of a "custom" pbuf, some code might think the
memory where
"custom_free_function" is stored is actually pbuf payload region and overwrite
it...
Simon