<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 - MSan should support asm-goto"
   href="https://bugs.llvm.org/show_bug.cgi?id=42479">42479</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>MSan should support asm-goto
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>Transformation Utilities
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>glider@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat t.c
#include <stdio.h>
int main() {
  asm goto("jmp %l0" ::::skip_label);
  fprintf(stderr, "Hi!\n");
skip_label:
  fprintf(stderr, "Bye!\n");
  return 0;
}

$ clang t.c -o t -no-integrated-as
$ ./t
Bye!

$ clang t.c -o t -no-integrated-as -fsanitize=memory
clang-9:
/usr/local/google/src/llvm-git-monorepo/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3236:
void {anonymous}::MemorySanitizerVisitor::visitCallSite(llvm::CallSite):
Assertion `(CS.isCall() || CS.isInvoke()) && "Unknown type of CallSite"'
failed.
Stack dump:
0.      Program arguments:
/usr/local/google/src/llvm-git-monorepo/llvm_cmake_build/bin/clang-9 -cc1
-triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name t.c
-mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno
-masm-verbose -no-integrated-as -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb
-resource-dir
/usr/local/google/src/llvm-git-monorepo/llvm_cmake_build/lib/clang/9.0.0
-internal-isystem /usr/local/include -internal-isystem
/usr/local/google/src/llvm-git-monorepo/llvm_cmake_build/lib/clang/9.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fno-dwarf-directory-asm -fdebug-compilation-dir
/usr/local/google/src/llvm-git-monorepo -ferror-limit 19 -fmessage-length 0
-fsanitize=memory
-fsanitize-blacklist=/usr/local/google/src/llvm-git-monorepo/llvm_cmake_build/lib/clang/9.0.0/share/msan_blacklist.txt
-fsanitize-memory-use-after-dtor -fno-assume-sane-operator-new
-fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/t-3bc9a0.s -x c t.c 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module 't.c'.
4.      Running pass 'MemorySanitizerLegacyPass' on function '@main'</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>