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

            Bug ID: 18416
           Summary: Null pointer passed as an argument: describe parameter
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

I got the following error report:

   memcpy((void *)aItemP->data->content,utf8Payload.c_str(),origSize+1);

   <- Null pointer passed as an argument to a 'nonnull' parameter

It would be nice if scan-build could report *which* parameter is passed a null
pointer, either by giving the position an/or the name of that parameter
(better). The column number did not help either, it referred to the "m" in
memcpy().

If there are other, similar reports involving arguments for functions or
methods, the enhancement probably would be useful for those, too.

In this particular case I've not been able to figure out what triggers the
report. That's a separate issue, but while we are at it let me at least ask:
does the report mean that the argument *might* be null (because there is no
explicit check for null) or that scan-build has determined that it *is* null?

-- 
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