瀏覽代碼

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.
Darian Leung 6 年之前
父節點
當前提交
e52c0d0da2
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      components/heap/multi_heap_poisoning.c

+ 1 - 1
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;