<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 --- - [MSan] Failed to catch conditional move?"
   href="http://llvm.org/bugs/show_bug.cgi?id=17068">17068</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[MSan] Failed to catch conditional move?
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </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>compiler-rt
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>chandlerc@gmail.com
          </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>Not sure if this is an msan bug or not, but I feel like it should have caught
this:

% cat msan/bug.cpp 
int main() {
  int x;
  int *volatile p = &x;
  return *p ? 0 : 1;
}

% ~/bin/clang++ -o msan_bug -std=c++11 -g -fsanitize=memory msan/bug.cpp
% ./msan_bug

The program exits with status 1.


However, this equivalent program produces a lovely msan report:
% cat msan/bug.cpp 
int main() {
  int x;
  int *volatile p = &x;
  if (*p)
    return 0;
  return 1;
}
% ~/bin/clang++ -o msan_bug -std=c++11 -g -fsanitize=memory msan/bug.cpp
% ./msan_bug                                                                    
==20078== WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7f42598d1518
(/home/chandlerc/src/llvm.git/build/gn_2013/msan_bug+0x2f518)
    #1 0x7f42589e160c (/lib64/libc.so.6+0x2460c)
    #2 0x7f42598d12b0
(/home/chandlerc/src/llvm.git/build/gn_2013/msan_bug+0x2f2b0)
Exiting</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>