lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #41188] Alignment error in memp_init() when MEMP_SEPAR


From: Valery Ushakov
Subject: [lwip-devel] [bug #41188] Alignment error in memp_init() when MEMP_SEPARATE_POOLS==1
Date: Thu, 23 Jan 2014 04:32:21 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0

Follow-up Comment #2, bug #41188 (project lwip):

Actually, don't separate pools need the same MEM_ALIGNMENT-1 padding
at the beginning as memp_memory has to compensate for potential
misalignment?

>From a quick look - consider a trivial case of a pool with 1 element
that is 8 bytes large and with alignment of 8.  It's memory base will
be declared of size 8.  If the base ends up allocated, say, only
4-aligned, but not 8-aligned, LWIP_MEM_ALIGN will offset 4 bytes into
the array and the returned object will be outside the bounds of the
pool memory.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?41188>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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