Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Medium

New issue 334 by [email protected]: ASan doesn't print stats after an LSan report
http://code.google.com/p/address-sanitizer/issues/detail?id=334

$ cat t.c
#include <stdio.h>
#include <stdlib.h>
int main() {
#ifndef NO_MALLOC
  char *p = malloc(64);
  printf("p: %p\n", p);
#endif
  return 0;
}

$ clang t.c -fsanitize=address -o t -DNO_MALLOC
$ ASAN_OPTIONS=print_stats=1:atexit=1 ./t
AddressSanitizer exit stats:
Stats: 0M malloced (0M for red zones) by 0 calls
...
$ clang t.c -fsanitize=address -o t
$ ASAN_OPTIONS=print_stats=1:atexit=1 ./t
p: 0x60600000efc0

=================================================================
==19371==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 1 object(s) allocated from:
#0 0x4a365b in __interceptor_malloc (/usr/local/google/ssd/chrome-git/src/t+0x4a365b)
    #1 0x4c0e89 in main (/usr/local/google/ssd/chrome-git/src/t+0x4c0e89)
#2 0x7f2e3213178c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226

SUMMARY: AddressSanitizer: 64 byte(s) leaked in 1 allocation(s).

(no stats printed)

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to