[LLVMbugs] [Bug 19585] Memory leak with realloc() not reported.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 28 18:23:30 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19585

Jordan Rose <jordan_rose at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jordan_rose at apple.com
         Resolution|---                         |WONTFIX

--- Comment #1 from Jordan Rose <jordan_rose at apple.com> ---
The MallocChecker tries to strike a balance between people who try to handle
allocation failure and people who don't. Most applications aren't really
equipped to handle malloc or realloc failing -- even if they recover from that
error, they'll crash the next time through the event loop, or similar. So, the
analyzer won't force you to check the result of malloc or realloc, and will
assume success if you don't. If you /do/ check for failure, though, then it can
perform additional checks based on that knowledge, like the realloc leak.

This is something that we could take a configuration option for, but we
currently don't have one.

-- 
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/20140429/c868f64b/attachment.html>


More information about the llvm-bugs mailing list