<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - r368276 caused msan false positive in vectorized crc code"
   href="https://bugs.llvm.org/show_bug.cgi?id=42982">42982</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>r368276 caused msan false positive in vectorized crc code
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>hans@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22372" name="attach_22372" title="reproducer">attachment 22372</a> <a href="attachment.cgi?id=22372&action=edit" title="reproducer">[details]</a></span>
reproducer

Building the attached source code at r368276:

$ /work/llvm.monorepo/build.release/bin/clang.bad crc32_simd.c -msse4.2
-mpclmul -g -O2 -fsanitize=memory
$ MSAN_SYMBOLIZER_PATH=/work/llvm.monorepo/build.release/bin/llvm-symbolizer
./a.out
==87075==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x4a2c06 in crc32_sse42_simd_ /tmp/crc32_simd.c:141:10
    #1 0x4a2c06 in main /tmp/crc32_simd.c:163:10
    #2 0x7fed1ff0152a in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2352a)
    #3 0x41f299 in _start (/tmp/a.out+0x41f299)

SUMMARY: MemorySanitizer: use-of-uninitialized-value /tmp/crc32_simd.c:141:10
in crc32_sse42_simd_
Exiting


The warning didn't fire before, and I don't see anything wrong with the code.
This suggests perhaps the transformation in r368660 is not correct, or exposed
some previous problem. It was reverted in r368660.



(This was discovered in Chromium, see <a href="https://crbug.com/992853">https://crbug.com/992853</a>)</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>