From 4b05708daf7d0c35b3c241b41e113034e7a64210 Mon Sep 17 00:00:00 2001 From: Darian Leung Date: Mon, 9 Sep 2019 21:56:39 +0800 Subject: [PATCH] heap: Fix printf usage in heap poisoning This commit fixes the bug where printf() is used in verify_allocated_region() when ets_printf() should be used. --- components/heap/multi_heap_poisoning.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/heap/multi_heap_poisoning.c b/components/heap/multi_heap_poisoning.c index 3c8cff2410..8705ac9eb6 100644 --- a/components/heap/multi_heap_poisoning.c +++ b/components/heap/multi_heap_poisoning.c @@ -110,7 +110,7 @@ static poison_head_t *verify_allocated_region(void *data, bool print_errors) } if (canary != TAIL_CANARY_PATTERN) { if (print_errors) { - printf("CORRUPT HEAP: Bad tail at %p. Expected 0x%08x got 0x%08x\n", &tail->tail_canary, + MULTI_HEAP_STDERR_PRINTF("CORRUPT HEAP: Bad tail at %p. Expected 0x%08x got 0x%08x\n", &tail->tail_canary, TAIL_CANARY_PATTERN, canary); } return NULL;