zephyr/lib
Andy Ross d0490fe9f9 lib/os/mempool: Fix corruption case with block splitting
The block_fits() predicate was borked.  It would check that a block
fits within the bounds of the whole heap.  But that's not enough:
because of alignment changes between levels the sub-blocks may be
adjusted forward.  It needs to fit inside the PARENT block that it was
split from.

What could happen at runtime is that the last subblocks of a
misaligned parent block would overlap memory from subsequent blocks,
or even run off the end of the heap.  That's bad.

Change the API of block_fits() a little so it can extract the parent
region and do this properly.

Fixes #15279.  Passes test introduced in #16728 to demonstrate what
seems like the same issue.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-06-25 18:51:08 -07:00
..
cmsis_rtos_v1 lib: cmsis_v1: set stack size larger if coverage 2019-05-02 15:42:33 -04:00
cmsis_rtos_v2 lib: cmsis_v2: increase stack sizes if coverage 2019-05-02 15:42:33 -04:00
gui gui: Corrected RGB888 pointer in LVGL write function 2019-05-30 09:33:07 -04:00
libc prf.c: implement the ll length modifiers 2019-06-17 10:58:09 -07:00
os lib/os/mempool: Fix corruption case with block splitting 2019-06-25 18:51:08 -07:00
posix posix: Fix calculation of clock base in clock_settime 2019-05-21 08:24:59 -04:00
updatehub docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
CMakeLists.txt lib: updatehub: Add UpdateHub.io support 2019-06-05 00:20:37 +02:00
Kconfig lib: updatehub: Add UpdateHub.io support 2019-06-05 00:20:37 +02:00