[llvm-bugs] [Bug 35729] New: False positive when returning an inner pointer from malloc'ed block
llvm-bugs at lists.llvm.org
Fri Dec 22 02:02:47 PST 2017
Bug ID: 35729
Summary: False positive when returning an inner pointer from
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: christopher.crouzet at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 19594
As suggested by the FAQ
(https://clang-analyzer.llvm.org/faq.html#suppress_issue), I am here to report
what I (and Valgrind) believe is a false positive.
When implementing an aligned allocator, it is common to allocate a block and
return to the user only a different pointer located within the block, which
Clang Static Analyzer flags as a potential leak of memory.
Attached is a short code snippet that triggers the false positive.
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs