[Top][All Lists]

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

[lwip-devel] [bug #37158] MEM_USE_POOLS==1: LWIP_ASSERT (rmem == LWIP_ME

From: Simon Goldschmidt
Subject: [lwip-devel] [bug #37158] MEM_USE_POOLS==1: LWIP_ASSERT (rmem == LWIP_MEM_ALIGN(rmem)) fails
Date: Tue, 21 Aug 2012 14:39:39 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.79 Safari/537.1

Update of bug #37158 (project lwip):

                  Status:                    None => Need Info              
             Assigned to:                    None => goldsimon              
                 Summary: LWIP_ASSERT (rmem == LWIP_MEM_ALIGN(rmem)) fails =>
MEM_USE_POOLS==1: LWIP_ASSERT (rmem == LWIP_MEM_ALIGN(rmem)) fails


Follow-up Comment #1:

[Updating the summary to reflect MEM_USE_POOLS==1]

First: the LWIP_ASSERT line you quoted is line 134 in my 1.4.0 sources, not
line 137 as the stack trace says.

As alignment is highliy port-dependent, could you tell us what
hardware/lwIP-port you are using and what's the native alignment requirement
of that hardware?

It seems like your bug report is true, though: for MEM_USE_POOLS==1,
mem_malloc() gets an aligned 'element' pointer from memp_malloc() and then
increases 'element'. The resulting pointer might not be aligned any more, as
the struct memp_malloc_helper only contains one memp_t, which will be an

Could you remove the assert from mem.c:134 and see if it works? Especially the
2nd next assert which checks that 'hmem' is alingned should not fire. If so,
I'd just remove line 134...


Reply to this item at:


  Nachricht gesendet von/durch Savannah

reply via email to

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