zephyr/tests/lib
Nicolas Pitre c227fe7b80 lib/os/heap: Correct aligned_alloc sizing for small heaps
The code that made aligned_alloc work with the 4-byte heap headers was
requesting a block of the correctly padded size, and correctly
aligning the output buffer within that memory, but it was using the
UNALIGNED chunk size for the buffer as the final size of the block
with splitting off the unused suffix.  So the final chunk in the
buffer was could be incorrectly returned to the heap and reused,
leading to overlap.

Compute the chunk size of the output buffer based on the
already-aligned output pointer instead.

Initial investigation and fix from Andy Ross <andrew.j.ross@intel.com>.
I reworked his fix, created a test case, and stolen his commit log.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2020-10-23 12:52:04 -04:00
..
c_lib libc: add strtok_r implementation 2020-08-18 09:19:58 -07:00
cmsis_dsp tests: lib: cmsis:transform: cf64 min_ram reorder test to fit 96k 2020-09-10 09:37:35 +02:00
devicetree/api devicetree: add first round of dependency ordinal info 2020-10-14 13:18:44 -05:00
fdtable tests: lib: fdtable: fix tests after modifying reference counting 2020-08-27 11:42:19 +03:00
gui/lvgl sanitycheck: inclusive language 2020-08-27 07:04:07 -04:00
heap tests: heap: exclude on qemu_xtensa 2020-09-30 14:11:59 -04:00
heap_align lib/os/heap: Correct aligned_alloc sizing for small heaps 2020-10-23 12:52:04 -04:00
json
mem_alloc tests: mem_alloc: workaround aggressive optimization 2020-10-06 11:41:23 -04:00
notify
onoff tests: onoff: use typedef for spinlock key 2020-10-06 19:56:51 -04:00
ringbuffer Tests: ringbuffer: Improve the description cases 2020-10-14 07:43:39 -04:00
sprintf