lewisje / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
0 stars 0 forks source link

use-after-return causes false positive leak reports #229

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
% clang -g -O3 -fsanitize=address 
~/llvm/projects/compiler-rt/lib/asan/lit_tests/TestCases/inline.cc 
% ASAN_OPTIONS=detect_stack_use_after_return=1:detect_leaks=1 ./a.out 

=================================================================
==27200==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 10 byte(s) in 1 object(s) allocated from:
    #0 0x4446c6 in __interceptor_malloc /home/kcc/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:74
    #1 0x4587bd in main /home/kcc/llvm/projects/compiler-rt/lib/asan/lit_tests/TestCases/inline.cc:14
    #2 0x7fb5f44b076c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226

SUMMARY: LeakSanitizer: 10 byte(s) leaked in 1 allocation(s).

Original issue reported on code.google.com by konstant...@gmail.com on 1 Oct 2013 at 1:00

GoogleCodeExporter commented 9 years ago
Committed r192593 to add basic support for this. Further refinements are needed 
to eliminate potential false negatives.

Original comment by earth...@google.com on 14 Oct 2013 at 2:09

GoogleCodeExporter commented 9 years ago
Since LSan now ignores all ASan-poisoned memory, no further refinements are 
needed.

Original comment by earth...@google.com on 23 Dec 2013 at 3:02

GoogleCodeExporter commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Original comment by ramosian.glider@gmail.com on 30 Jul 2015 at 9:13