lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Pbuf Assert


From: Simon Goldschmidt
Subject: Re: [lwip-users] Pbuf Assert
Date: Fri, 28 Sep 2018 07:48:40 +0200

Greenwood, Gregory A. wrote:
> I have stopped the problem but I am not sure of the root cause.
> It does not seem to have anything to do with LWIP itself.  I was
> using a utility feature supplied by STM that prints debug messages
> to the LCD screen on the evaluation board.  When I reduced the
> number of messages and text length, the Assert stopped occurring.

This top-posting somehow makes the whole thread unreadable...
 
> [..]
> I cannot figure out why I am getting an Assert in pbuf.c at line 747:
>   LWIP_ASSERT("pbuf_free: p->ref > 0", p->ref > 0);
> I know the obvious answer, in the p->ref cannot be 0.
> The problem is that I cannot tell what would cause p->ref to be 0.
> And this is occurring in a while loop that depends on p != NULL.
> I am using the LWIP that comes from CubeMX for STM32H7.
> LWIP version 2.0.3.

Either you're double-freeing a pbuf (like Patrick alread wrote). In
that case, the changed debug messages might just have changed the
runtime behaviour in a way that hides this bug.

Or you just might have a memory corruption issue where the debug
output code overwrites arbitrary memory.

In any case, this is not a bug in lwIP. Have you asked in ST specific
forums already?

I haven't yet found the time to test the new CubeMX release where
they finally managed to include 2.0.3, so I can't tell if it is
correct. But this is on my list... How did you create the project,
did you use an example project or a project completely generated by
CubeMX where you enabled the lwIP library?

Simon



reply via email to

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