<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 - Run dead loop after compiling github microsoft compiler-tests sehframes.cpp with clang-cl and lld"
   href="https://bugs.llvm.org/show_bug.cgi?id=50858">50858</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Run dead loop after compiling github microsoft compiler-tests sehframes.cpp with clang-cl and lld
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tao.pan@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The test c file is in
<a href="https://github.com/microsoft/compiler-tests/blob/master/seh/sehframes.cpp">https://github.com/microsoft/compiler-tests/blob/master/seh/sehframes.cpp</a>

No problem if use cl.exe
D:\llvm\compiler-tests\seh>cl.exe seh0020.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30037 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

seh0020.c
Microsoft (R) Incremental Linker Version 14.29.30037.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:seh0020.exe
seh0020.obj

D:\llvm\compiler-tests\seh>cl.exe sehframes.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30037 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

sehframes.cpp
Microsoft (R) Incremental Linker Version 14.29.30037.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:sehframes.exe
sehframes.obj

D:\llvm\compiler-tests\seh>sehframes.exe
Test pass 1 - no exceptions
Simple
Try
GSCookie
TryAndGSCookie
Align
TryAndAlign
GSCookieAndAlign
TryAndGSCookieAndAlign
Alloca
TryAndAlloca
GSCookieAndAlloca
TryAndGSCookieAndAlloca
AlignAndAlloca
TryAndAlignAndAlloca
GSCookieAndAlignAndAlloca
TryAndGSCookieAndAlignAndAlloca
BigLocals
TryAndBigLocals
GSCookieAndBigLocals
TryAndGSCookieAndBigLocals
AlignAndBigLocals
TryAndAlignAndBigLocals
GSCookieAndAlignAndBigLocals
TryAndGSCookieAndAlignAndBigLocals
AllocaAndBigLocals
TryAndAllocaAndBigLocals
GSCookieAndAllocaAndBigLocals
TryAndGSCookieAndAllocaAndBigLocals
AlignAndAllocaAndBigLocals
TryAndAlignAndAllocaAndBigLocals
GSCookieAndAlignAndAllocaAndBigLocals
TryAndGSCookieAndAlignAndAllocaAndBigLocals
EbpAdj
TryAndEbpAdj
GSCookieAndEbpAdj
TryAndGSCookieAndEbpAdj
AlignAndEbpAdj
TryAndAlignAndEbpAdj
GSCookieAndAlignAndEbpAdj
TryAndGSCookieAndAlignAndEbpAdj
AllocaAndEbpAdj
TryAndAllocaAndEbpAdj
GSCookieAndAllocaAndEbpAdj
TryAndGSCookieAndAllocaAndEbpAdj
AlignAndAllocaAndEbpAdj
TryAndAlignAndAllocaAndEbpAdj
GSCookieAndAlignAndAllocaAndEbpAdj
TryAndGSCookieAndAlignAndAllocaAndEbpAdj
Test pass 2 - exceptions
Simple
Try
GSCookie
TryAndGSCookie
Align
TryAndAlign
GSCookieAndAlign
TryAndGSCookieAndAlign
Alloca
TryAndAlloca
GSCookieAndAlloca
TryAndGSCookieAndAlloca
AlignAndAlloca
TryAndAlignAndAlloca
GSCookieAndAlignAndAlloca
TryAndGSCookieAndAlignAndAlloca
BigLocals
TryAndBigLocals
GSCookieAndBigLocals
TryAndGSCookieAndBigLocals
AlignAndBigLocals
TryAndAlignAndBigLocals
GSCookieAndAlignAndBigLocals
TryAndGSCookieAndAlignAndBigLocals
AllocaAndBigLocals
TryAndAllocaAndBigLocals
GSCookieAndAllocaAndBigLocals
TryAndGSCookieAndAllocaAndBigLocals
AlignAndAllocaAndBigLocals
TryAndAlignAndAllocaAndBigLocals
GSCookieAndAlignAndAllocaAndBigLocals
TryAndGSCookieAndAlignAndAllocaAndBigLocals
EbpAdj
TryAndEbpAdj
GSCookieAndEbpAdj
TryAndGSCookieAndEbpAdj
AlignAndEbpAdj
TryAndAlignAndEbpAdj
GSCookieAndAlignAndEbpAdj
TryAndGSCookieAndAlignAndEbpAdj
AllocaAndEbpAdj
TryAndAllocaAndEbpAdj
GSCookieAndAllocaAndEbpAdj
TryAndGSCookieAndAllocaAndEbpAdj
AlignAndAllocaAndEbpAdj
TryAndAlignAndAllocaAndEbpAdj
GSCookieAndAlignAndAllocaAndEbpAdj
TryAndGSCookieAndAlignAndAllocaAndEbpAdj
Test passed

Dead loop if use clang-cl.exe
$ /c/work/llvm/llvm-project-4/build/Release/bin/clang-cl.exe sehframes.cpp
-fuse-ld=lld
$ ./sehframes.exe 
Test pass 1 - no exceptions
Simple
Try
GSCookie
TryAndGSCookie
Align
TryAndAlign
GSCookieAndAlign
TryAndGSCookieAndAlign
Alloca
TryAndAlloca
GSCookieAndAlloca
TryAndGSCookieAndAlloca
AlignAndAlloca
TryAndAlignAndAlloca
GSCookieAndAlignAndAlloca
TryAndGSCookieAndAlignAndAlloca
BigLocals
TryAndBigLocals
GSCookieAndBigLocals
TryAndGSCookieAndBigLocals
AlignAndBigLocals
TryAndAlignAndBigLocals
GSCookieAndAlignAndBigLocals
TryAndGSCookieAndAlignAndBigLocals
AllocaAndBigLocals
TryAndAllocaAndBigLocals
GSCookieAndAllocaAndBigLocals
TryAndGSCookieAndAllocaAndBigLocals
AlignAndAllocaAndBigLocals
TryAndAlignAndAllocaAndBigLocals
GSCookieAndAlignAndAllocaAndBigLocals
TryAndGSCookieAndAlignAndAllocaAndBigLocals
EbpAdj
TryAndEbpAdj
GSCookieAndEbpAdj
TryAndGSCookieAndEbpAdj
AlignAndEbpAdj
TryAndAlignAndEbpAdj
GSCookieAndAlignAndEbpAdj
TryAndGSCookieAndAlignAndEbpAdj
AllocaAndEbpAdj
TryAndAllocaAndEbpAdj
GSCookieAndAllocaAndEbpAdj
TryAndGSCookieAndAllocaAndEbpAdj
AlignAndAllocaAndEbpAdj
TryAndAlignAndAllocaAndEbpAdj
GSCookieAndAlignAndAllocaAndEbpAdj
TryAndGSCookieAndAlignAndAllocaAndEbpAdj
Test pass 2 - exceptions
Simple
Try
GSCookie
TryAndGSCookie
Align
TryAndAlign
Try
GSCookie
TryAndGSCookie
Align
TryAndAlign
Try
GSCookie
....</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>