<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 - [llvm-mc] MC/Disassembler/Lanai/v11.txt fails on Windows when LLVM_ENABLE_ASSERTIONS is not set"
   href="https://bugs.llvm.org/show_bug.cgi?id=37372">37372</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[llvm-mc] MC/Disassembler/Lanai/v11.txt fails on Windows when LLVM_ENABLE_ASSERTIONS is not set
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>llvmc
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>stilis@microsoft.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I suspect this bug has been around for a while but hasn't been caught because
the bots all set LLVM_ENABLE_ASSERTIONS to True. The bug only reproduces when
LLVM_ENABLE_ASSERTIONS is not set (or is set to False). We can confirm that
this fails on Windows Server 2016/Windows 10 when running with Python 2.7 or
Python 3. Here are example CMake options from a failing build on Windows Server
2016:

-DPYTHON_HOME=C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64
-DCMAKE_BUILD_TYPE=release
-G Visual Studio 15 2017 Win64
-Thost=x64

Here is the log from the failure:

          ********************
          FAIL: LLVM :: MC/Disassembler/Lanai/v11.txt (18063 of 25397)
          ******************** TEST 'LLVM :: MC/Disassembler/Lanai/v11.txt'
FAILED ********************
          Script:
          --
          E:\_work\1\b\release\bin\llvm-mc.EXE -disassemble -triple lanai
E:\_work\1\s\llvm\test\MC\Disassembler\Lanai\v11.txt |
E:\_work\1\b\release\bin\FileCheck.EXE
E:\_work\1\s\llvm\test\MC\Disassembler\Lanai\v11.txt
          --
          Exit Code: 1

          Command Output (stdout):
          --
          $ "E:\_work\1\b\release\bin\llvm-mc.EXE" "-disassemble" "-triple"
"lanai" "E:\_work\1\s\llvm\test\MC\Disassembler\Lanai\v11.txt"
          # command stderr:
          LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB. 
Make sure the file exists and is readable.  Calling loadDataForExe



          LLVMSymbolizer: error reading file: PDB Error: Unable to load PDB. 
Make sure the file exists and is readable.  Calling loadDataForExe



          #0 0x00007ff769ab5053 (E:\_work\1\b\release\bin\llvm-mc.EXE+0x3c5053)

          #1 0x00007ff769ab3d5b (E:\_work\1\b\release\bin\llvm-mc.EXE+0x3c3d5b)

          #2 0x00007ff769ab413e (E:\_work\1\b\release\bin\llvm-mc.EXE+0x3c413e)

          #3 0x00007ff769945d28 (E:\_work\1\b\release\bin\llvm-mc.EXE+0x255d28)

          #4 0x00007ff76973a873 (E:\_work\1\b\release\bin\llvm-mc.EXE+0x4a873)

          #5 0x00007ff76973aea8 (E:\_work\1\b\release\bin\llvm-mc.EXE+0x4aea8)

          #6 0x00007ff769739dd9 (E:\_work\1\b\release\bin\llvm-mc.EXE+0x49dd9)

          #7 0x00007ff769a0e9f8 (E:\_work\1\b\release\bin\llvm-mc.EXE+0x31e9f8)

          #8 0x00007ff810a08364 (C:\Windows\System32\KERNEL32.DLL+0x8364)

          #9 0x00007ff812d47091 (C:\Windows\SYSTEM32\ntdll.dll+0x67091)


 ##[error]CUSTOMBUILD(0,0): Error : command failed with exit status: 3221225477
      1>CUSTOMBUILD : error : command failed with exit status: 3221225477
[e:\_work\1\b\test\check-llvm.vcxproj]
          $ "E:\_work\1\b\release\bin\FileCheck.EXE"
"E:\_work\1\s\llvm\test\MC\Disassembler\Lanai\v11.txt"
          # command stderr:
 ##[error]llvm\test\MC\Disassembler\Lanai\v11.txt(42,10): Error G8E235623:
expected string not found in input
      1>E:\_work\1\s\llvm\test\MC\Disassembler\Lanai\v11.txt(42,10): error
G8E235623: expected string not found in input
[e:\_work\1\b\test\check-llvm.vcxproj]

          # CHECK: and.f %r17, 0x1234ffff, %r21

                   ^

          <stdin>:21:2: note: scanning from here

           and.f %r17, 0x

           ^</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>