[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #47172] mem.c mem_malloc implementation does not prope
From: |
David Fernandez |
Subject: |
[lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT |
Date: |
Thu, 18 Feb 2016 20:31:33 +0000 |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 |
Follow-up Comment #5, bug #47172 (project lwip):
>> we have to put them somewhere else
>
> So why don't you zero them there?
That is what I'm doing to work around it, but that avoids the extra checking,
and thought that adding an optional way to zeroize that metadata in the memory
pool or heap shouldn't be a bad thing.
>> The memory block will be zeroed or written first by the user
>> before it tries to read from it
>
> That's optimistic!
I mean, the client of mem_malloc, or memp_malloc will write before reading.
That is enforced in our code base by that hardware feature I mentioned.
> I would have bet there are other cases of alignment issues throughout the
lwip code like the two you already mentioned.
All the ones I'm interested are the pools and heap, which are just two cases
localized to two files, and all that they need is to zeroize with the sizeof
the structure, or that size aligned to the MEM_ALIGNMENT (SIZEOF_MEMP_STRUCT)
>> I'm just asking for an additional optional configuration option
>
> Not another config option, please! :-)
OK, fine, I thought the preference would be to provide config options that
avoid doing ugly things, but I guess it is not.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?47172>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT, David Fernandez, 2016/02/16
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT, David Fernandez, 2016/02/17
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT, Simon Goldschmidt, 2016/02/18
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT, David Fernandez, 2016/02/18
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT, Simon Goldschmidt, 2016/02/18
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT,
David Fernandez <=
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT, Simon Goldschmidt, 2016/02/18
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT, David Fernandez, 2016/02/18
- [lwip-devel] [bug #47172] mem.c mem_malloc implementation does not properly account for MEM_ALIGNMENT, Simon Goldschmidt, 2016/02/19