docs(heap_debug): Add missing information

- Place the section on alloc failed hook at a better place
- Add reference to the different poisoning configs at the beginning
  of the heap corruption detectino section
- Update the information concerning heap tracing
- Update the heap tracing log examples
- Fix heap tracing standalone code:
  - Update the logging format in heap_trace_dump_base
  - Add freed field in trace stucture to keep this info even
    when no call stack is available
This commit is contained in:
Guillaume Souchere
2024-08-20 14:34:41 +02:00
parent 43b0d1053c
commit 8e06c4ca6a
6 changed files with 218 additions and 99 deletions

View File

@@ -42,8 +42,6 @@ TEST_CASE("heap trace leak check", "[heap-trace]")
void *b = malloc(96);
memset(b, '4', 11);
printf("a.address %p vs %p b.address %p vs %p\n", a, recs[0].address, b, recs[1].address);
heap_trace_dump();
TEST_ASSERT_EQUAL(2, heap_trace_get_count());
@@ -51,8 +49,6 @@ TEST_CASE("heap trace leak check", "[heap-trace]")
heap_trace_get(0, &trace_a);
heap_trace_get(1, &trace_b);
printf("trace_a.address %p trace_bb.address %p\n", trace_a.address, trace_b.address);
TEST_ASSERT_EQUAL_PTR(a, trace_a.address);
TEST_ASSERT_EQUAL_PTR(b, trace_b.address);