gcc does not support leak sanitizer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.9 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I'm using ubuntu 15.04
I'm trying to use the "leak sanitizer" feature of address sanitizer in stand alone.
Here is the a simple code example:
#include <stdlib.h>
int main(){
malloc(1);
return 0;
}
Compiled with gcc-4.9 -g -fsanitize=leak and running the program, I observe no output, and the binary does not link to /usr/lib64/
With clang or the gcc-5 of ubuntu 15.04 (5.1.1) it works fine, I have the expected output:
=======
==7779==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1 byte(s) in 1 object(s) allocated from:
#0 0x7f3d7f94f9a5 in __interceptor_
#1 0x4006b3 in main /home/tellaa/
#2 0x7f3d7f599a3f in __libc_start_main (/lib/x86_
SUMMARY: LeakSanitizer: 1 byte(s) leaked in 1 allocation(s).
For the record:
-the gcc of ubuntu 15.10 (gcc-5.2.1) does not work either.
- I compiled gcc from source, and it worked
http://
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: gcc-4.9 4.9.2-10ubuntu13
ProcVersionSign
Uname: Linux 3.19.0-18-generic x86_64
NonfreeKernelMo
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
Date: Thu Dec 3 14:52:46 2015
InstallationDate: Installed on 2015-05-26 (191 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
SourcePackage: gcc-4.9
UpgradeStatus: No upgrade log present (probably fresh install)
Status changed to 'Confirmed' because the bug affects multiple users.