mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
feat(esp_rom): patch heap walker to the ROM implementation
modify existing patch of TLSF rom and add multi heap patch to add the walker feature to the ROM implementation of the heap component.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||
*/
|
||||
@@ -85,6 +85,9 @@ TEST_CASE("heap walker corrupted heap detection", "[heap]")
|
||||
size_t metadata_size_tail = 0;
|
||||
calculate_block_metadata_size(&metadata_size_head, &metadata_size_tail);
|
||||
(void)metadata_size_tail;
|
||||
|
||||
/* corrupting the size field of the block metadata with a size bigger
|
||||
* than the heap itself */
|
||||
*((uint32_t*)default_ptr - (metadata_size_head / 4) - 1) = 0xFF000000;
|
||||
|
||||
/* Write the pass code in the first word of the allocated memory */
|
||||
|
Reference in New Issue
Block a user