[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #48300] Private mempools allocate foreign memory
From: |
chrysn |
Subject: |
[lwip-devel] [bug #48300] Private mempools allocate foreign memory |
Date: |
Thu, 23 Jun 2016 15:31:23 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux) AppleWebKit/538.15 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/538.15 Midori/0.5 |
Follow-up Comment #1, bug #48300 (project lwip):
The issue can be worked around by adding
`__attribute__((aligned(MEM_ALIGNMENT)))` after the u8_t of
LWIP_MEMPOOL_DECLARE -- but that's a GCC'ism, and as I only see those in cc.h
for `PACK_STRUCT_STRUCT`, I assume that the general intention is to keep such
compiler-isms there; the hard thing here (as compared to `PACK_STRUCT_STRUCT`,
which I assume is only used for saving memory) is that such a feature can't be
generally assumed to be present on all compilers.
I see three possible courses of action:
* Add an ALIGN macro which would need to be defined in all users' `cc.h` to
keep this subtle bug from resurfacing. (No falling back to ignoring the
alignment unless MEM_ALIGNMENT = 1).
* Unconditionally add MEM_ALIGNMENT bytes at the end of pools to compensate
for any possible offset.
* Do the latter conditionally if the former is not implemented.
Which would you prefer?
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?48300>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, chrysn, 2016/06/23
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory,
chrysn <=
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, Dirk Ziegelmeier, 2016/06/23
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, chrysn, 2016/06/24
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, Dirk Ziegelmeier, 2016/06/24
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, Dirk Ziegelmeier, 2016/06/24
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, chrysn, 2016/06/24
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, Dirk Ziegelmeier, 2016/06/24
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, Simon Goldschmidt, 2016/06/27
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, Simon Goldschmidt, 2016/06/30
- [lwip-devel] [bug #48300] Private mempools allocate foreign memory, Simon Goldschmidt, 2016/06/30