[LLVMbugs] [Bug 22237] New: scan-build does not recognize custom malloc/free based on dlmalloc

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 15 02:38:04 PST 2015


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

            Bug ID: 22237
           Summary: scan-build does not recognize custom malloc/free based
                    on dlmalloc
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: simon.brandner at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

We use our own set of allocation routines.
They are called dr_malloc and dr_free, and are wrappers of a statically linked
version of dlmalloc (http://g.oswego.edu/dl/html/malloc.html).

I intentionally did remove a valid dr_free to see if the problem is detected by
scan-build, but nothing was reported.
This is somehow related to #14819, but I do not find any hints how to annotate
a malloc/free to tell clang which routines do replace normal malloc.

There is also a mailinglist thread requesting such a feature:
http://lists.cs.uiuc.edu/pipermail/cfe-users/2013-July/000166.html

It seems it did not end up in a feature request here.

So if it does not exist, a feature to indicate to clang/scan-build which
functions replace malloc/calloc/free so it can run its static analysis on them
would be a great enhancement.

-- 
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/20150115/efeae795/attachment.html>


More information about the llvm-bugs mailing list