<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Null pointer passed as an argument: describe parameter"
   href="http://llvm.org/bugs/show_bug.cgi?id=18416">18416</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Null pointer passed as an argument: describe parameter
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.3
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>kremenek@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>patrick.ohly@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>