zephyr/tests
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
..
application_development device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
arch arch/x86: Cleanup ACPI structure attributes names 2020-10-01 11:16:40 -07:00
benchmarks tests: initializing rbtree and its node 2020-10-21 10:06:42 -04:00
bluetooth tests: Bluetooth: bsim: Extended scanning with duration 2020-10-21 12:44:38 +02:00
boards device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
crypto ztest: remove ztest_mem_domain 2020-08-26 20:35:02 -04:00
deprecated/inttype dts: remove legacy macro support 2020-10-09 08:45:38 -05:00
drivers tests: drivers: build_all: Rework modem test to be more generic 2020-10-23 08:53:38 -05:00
kernel kernel: add context pointer to thread->fn_abort 2020-10-22 23:32:37 -04:00
lib lib/os/heap: Correct aligned_alloc sizing for small heaps 2020-10-23 12:52:04 -04:00
misc/test_build sanitycheck: inclusive language 2020-08-27 07:04:07 -04:00
net net: shell: Add network mgmt events monitor support 2020-10-13 13:42:50 +03:00
portability tests: cmsis_rtos_v2: Fix stack overflow 2020-10-13 20:04:31 +02:00
posix tests: posix: eventfd: increase test coverage with polling 2020-10-02 11:34:19 +02:00
shell tests: shell: Add test for too many arguments in the command 2020-09-14 16:05:11 +02:00
subsys fs: Move fs_file_system_t declaration out of fs.h 2020-10-23 12:55:41 +02:00
unit testsuite: fix unittest cross-language flags 2020-08-31 11:02:35 -04:00
ztest tests/samples: enable for integration testing 2020-07-30 08:00:03 -04:00