[LLVMbugs] [Bug 24170] New: Failure to find double delete
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jul 17 12:12:02 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=24170
Bug ID: 24170
Summary: Failure to find double delete
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: vabanque at gmx.net
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14604
--> https://llvm.org/bugs/attachment.cgi?id=14604&action=edit
shows correctly detected error
file1.cpp shows that the analyzer can detect a double delete caused by an
incorrect copy constructor.
$ scan_build clang++ file1.cpp
scan-build: Using 'clang/bin/clang' for static analysis
file1.cpp:9:9: warning: Attempt to free released memory
delete [] data;
^~~~~~~~~~~~~~
file2.cpp shows how the analyzer fails to detect a similar mistake in a copy
assignment operator.
$ scan_build clang++ file2.cpp
scan-build: Using '/clang/bin/clang' for static analysis
scan-build: Removing directory '/tmp/scan-build-2015-07-17-211038-16264-1'
because it contains no reports.
scan-build: No bugs found
$ clang -v
clang version 3.8.0 (trunk 242502)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation:
gcc4.9.2/lib/gcc/x86_64-unknown-linux-gnu/4.9.2
Found candidate GCC installation:
gcc4.9.2/lib64/gcc/x86_64-unknown-linux-gnu/4.9.2
Selected GCC installation: gcc4.9.2/lib64/gcc/x86_64-unknown-linux-gnu/4.9.2
Candidate multilib: .;@m64
Selected multilib: .;@m64
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150717/7098854b/attachment.html>
More information about the llvm-bugs
mailing list