Archit Gupta d5d752a9b6
Fix spurious heap_5 assert when allocation search reaches end marker (#1425)
When configENABLE_HEAP_PROTECTOR is 1 and a pvPortMalloc() request cannot
be satisfied by any free block, the free list search advances onto the end
marker (pxEnd) and validates it with heapVALIDATE_BLOCK_POINTER().

pxEnd is located at pucHeapHighAddress and is not part of the usable heap,
so the macro's "( pxBlock ) < pucHeapHighAddress" bounds check fails and the
configASSERT() fires on what is a normal out-of-memory condition. The code
should instead fall through and call the malloc failed hook.

Exclude the end marker from validation in the search loop so an allocation
that cannot be satisfied returns NULL (and invokes vApplicationMallocFailedHook
when configUSE_MALLOC_FAILED_HOOK is 1) without asserting.
2026-06-12 18:55:13 +00:00
..

[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,2
[InternetShortcut]
URL=https://www.FreeRTOS.org/a00111.html
IDList=