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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to