microsoft / mimalloc

mimalloc is a compact general purpose allocator with excellent performance.
MIT License
10.63k stars 867 forks source link

Wrong mimalloc stat with asan #938

Open thweetkomputer opened 2 months ago

thweetkomputer commented 2 months ago
#include <stdlib.h>

int main() {
    int *a = (int *)malloc(sizeof(int));
    *a = 1;

    return 0;
}

Hi, I wrote a demo and want to use mimalloc with asan enabled.

 gcc test.c -I/usr/local/include/mimalloc-2.1 -lmimalloc-asan-debug -fsanitize=address -fsanitize-recover=address -lpthre

I found that the stats all become zero, is this normal?

image

But the stat shows normally when asan is disabled.

image

Can you help me?