mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
heap_trace: fix bug in realloc for copying trace record
Closes https://github.com/espressif/esp-idf/issues/1354 Signed-off-by: Mahavir Jain <mahavir@espressif.com>
This commit is contained in:
parent
7e3ac34704
commit
18553c451a
@ -373,11 +373,11 @@ static IRAM_ATTR __attribute__((noinline)) void *trace_realloc(void *p, size_t s
|
||||
record_free(p, callers);
|
||||
}
|
||||
heap_trace_record_t rec = {
|
||||
.address = p,
|
||||
.address = r,
|
||||
.ccount = ccount,
|
||||
.size = size,
|
||||
};
|
||||
memcpy(rec.alloced_by, callers, sizeof(heap_trace_record_t) * STACK_DEPTH);
|
||||
memcpy(rec.alloced_by, callers, sizeof(void *) * STACK_DEPTH);
|
||||
record_allocation(&rec);
|
||||
}
|
||||
return r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user