Have ASAN errors show origin of memory

This commit is contained in:
Justine Tunney 2022-03-17 00:53:45 -07:00
parent e20fcf02c1
commit 46a3b88594
6 changed files with 256 additions and 4 deletions

View file

@ -45,7 +45,7 @@ static noasan void OnMemory(void *x, void *y, size_t n, void *a) {
static int i;
if (n) {
if (++i < 20) {
kprintf("%p %,d bytes", x, n);
kprintf("%p %,lu bytes [dlmalloc]", x, n);
if (IsAsan()) {
__asan_print_trace(x);
}