Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 406 by [email protected]: leak is only reported about 1/2 of runs
https://code.google.com/p/address-sanitizer/issues/detail?id=406

The attached program always leaks a malloc. However, the leak is not always reported. See expected output section.

What steps will reproduce the problem?
1. make check
2. make check
3. make check

What is the expected output? What do you see instead?


rfp@sebastian:~/src/asan.sometimes.leaks$ make check
clang-3.5 -g -fsanitize=address -O0 -fno-omit-frame-pointer -o leak leak.c
clang-3.5 --version
Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
./leak

=================================================================
==31259==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x49a88b in __interceptor_malloc (/home/rfp/src/asan.sometimes.leaks/leak+0x49a88b)
    #1 0x4b8218 in main /home/rfp/src/asan.sometimes.leaks/leak.c:4:15
#2 0x2b20fb394ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

SUMMARY: AddressSanitizer: 1 byte(s) leaked in 1 allocation(s).
make: *** [check] Error 23
rfp@sebastian:~/src/asan.sometimes.leaks$ make check
clang-3.5 --version
Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
./leak
rfp@sebastian:~/src/asan.sometimes.leaks$ make check
clang-3.5 --version
Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
./leak

=================================================================
==31268==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x49a88b in __interceptor_malloc (/home/rfp/src/asan.sometimes.leaks/leak+0x49a88b)
    #1 0x4b8218 in main /home/rfp/src/asan.sometimes.leaks/leak.c:4:15
#2 0x2b4d14b3eec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287

SUMMARY: AddressSanitizer: 1 byte(s) leaked in 1 allocation(s).
make: *** [check] Error 23
rfp@sebastian:~/src/asan.sometimes.leaks$ make check
clang-3.5 --version
Ubuntu clang version 3.5.0-4ubuntu2~trusty2 (tags/RELEASE_350/final) (based on LLVM 3.5.0)
Target: x86_64-pc-linux-gnu
Thread model: posix
./leak

What version of the product are you using? On what operating system?

ubuntu 14.04
clang-3.5


Please provide any additional information below.



Attachments:
        leak.c  114 bytes
        Makefile  158 bytes

--
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