-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
Description
Steps to reproduce:
scripts/config.pl set MBEDTLS_MEMORY_BUFFER_ALLOC_C
scripts/config.pl set MBEDTLS_MEMORY_DEBUG
scripts/config.pl set MBEDTLS_PLATFORM_MEMORY
make lib tests
tests/test_suite_memory_buffer_alloc
Output (at least on Ubuntu 16.04 x86_64):
Memory buffer alloc self test ..................................... PASS
Memory buffer alloc - free in middle, alloc at end ................ PASS
Memory buffer alloc - free in middle, realloc ..................... PASS
Memory buffer alloc - free in middle, merge, realloc .............. PASS
Memory buffer alloc - free at end, merge, realloc ................. PASS
Memory buffer alloc - Out of Memory test .......................... PASS
Memory buffer small buffer ........................................ FATAL: verification of first header failed
PASS
Memory buffer underalloc .......................................... PASS
----------------------------------------------------------------------------
PASSED (8 / 8 tests (0 skipped))
There are two bugs here:
FATAL: verification of first header failedindicates memory corruption (unless the bug is in the test code).- If a tests reveals a FATAL error, the test must not come up as PASSED.
I'm filing these bugs together because they may have the same root cause. If you fix one without fixing the other, please file an issue for the remaining bug.
Issue request type
[ ] Question
[ ] Enhancement
[x] Bug