[llvm-bugs] [Bug 50858] New: Run dead loop after compiling github microsoft compiler-tests sehframes.cpp with clang-cl and lld

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 24 22:33:11 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50858

            Bug ID: 50858
           Summary: Run dead loop after compiling github microsoft
                    compiler-tests sehframes.cpp with clang-cl and lld
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tao.pan at intel.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

The test c file is in
https://github.com/microsoft/compiler-tests/blob/master/seh/sehframes.cpp

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
....

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210625/d0b40b83/attachment.html>


More information about the llvm-bugs mailing list