mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 05:59:10 +00:00
Have ASAN errors show origin of memory
This commit is contained in:
parent
e20fcf02c1
commit
46a3b88594
6 changed files with 256 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue