<html>
    <head>
      <base href="https://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 --- - False positive: analyzer believes a value is garbage/undefined"
   href="https://llvm.org/bugs/show_bug.cgi?id=28338">28338</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>False positive: analyzer believes a value is garbage/undefined
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.8
          </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>normal
          </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>mactalla.obair@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16645" name="attach_16645" title="False positive test case">attachment 16645</a> <a href="attachment.cgi?id=16645&action=edit" title="False positive test case">[details]</a></span>
False positive test case

When reading an individual byte from a larger value, the static analyzer is
fine if:
a) reading any byte if the source is a uint32_t
b) reading the first byte if the source is a uint32_t[1]

But it falsely reports a problem if reading a subsequent byte from uint32_t[1]

The attached test case demonstrates good (silent) behaviour with VARIANT= 1, 2
and 3.  And exposes the false positive with VARIANT=4.

I also tested with clang-3.7 and clang-3.6, so it's not a regression.</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>