[LLVMbugs] [Bug 23138] New: Assertion: isa<UnreachableInst>(OutlinedBB->getTerminator()), file WinEHPrepare.cpp, line 659

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 6 16:07:24 PDT 2015


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

            Bug ID: 23138
           Summary: Assertion:
                    isa<UnreachableInst>(OutlinedBB->getTerminator()),
                    file WinEHPrepare.cpp, line 659
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: douglas_yung at playstation.sony.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code when compiled targeting Windows causes an assertion failure
in the compiler:

//===========
//
// Compile command: clang -cc1 -triple x86_64-pc-windows-msvc -emit-obj
-fcxx-exceptions -fexceptions
//
namespace std {
  inline void alpha( ) {}
  class bravo {
    public:
      void charlie(int delta)
      {
        echo(delta);
        try { alpha( ); } catch (...) { foxtrot(); }
      }
      void gulf() { try { hotel(); } catch (...) {} }
      void echo(int india) { gulf( ); }
      void foxtrot() {}
      void hotel() {}
  };
}
void foo()
{
    std::bravo v01;
    v01.charlie(1024);
}
//===========

When using a clang (r234143) built on Windows targeting Windows, compiling the
above code produces the following assertion failure:

Assertion failed: isa<UnreachableInst>(OutlinedBB->getTerminator()), file
C:\src\llvm\llvm\lib\CodeGen\WinEHPrepare.cpp, line 659
0x000000014091FF55 (0x0000000000000016 0x000007FEDEA7A68F 0x0000000000000000
0x0000000077929CAA)
0x000007FEE430EE1D (0x000007FE00000001 0x0000000100000000 0x000000014312FD80
0x0000000000000190), raise() + 0x1E9 bytes(s)
0x000007FEE4314A14 (0x000007FEE437C4D0 0x000000014312FD80 0x000000014312FED0
0x000000014312FD80), abort() + 0x18 bytes(s)
0x000007FEE4315D5F (0x0000000002AAA640 0x0000000000CAD550 0x0000000000000002
0x0000000002A3CFD0), _wassert() + 0x94F bytes(s)
0x00000001402E1450 (0x0000000000000000 0x0000000000ACD510 0x0000000000000000
0x0000000002AAA640)
0x00000001402EB014 (0x0000000000CAD550 0x0000000100000001 0x0000000000000004
0x0000000000CAD550)
0x00000001402ECCB4 (0x0000000000000001 0x0000000002A3E6F0 0x0000000002A3E6F0
0x0000000000000000)
0x000000014047346C (0x0000000000000000 0x000000000000000A 0x0000000002A27390
0x0000000000C72548)
0x000000014047370F (0x0000000000000000 0x0000000000ACDA79 0x0000000002A481C0
0x0000000000C72548)
0x0000000140473C60 (0x0000000002A22740 0x0000000002A72E78 0x0000000000000000
0x0000000000000000)
0x00000001404729B9 (0x0000000000C72438 0x0000000000ACDBB9 0x0000000000ACDC80
0x00000001432591B8)
0x0000000140EA8AE6 (0x0000000000C391B0 0x0000000000C391B0 0x0000000000ACDD10
0x0000000077801A4A)
0x0000000140EA8CB2 (0x0000000000C75E00 0x0000000000C75E00 0x0000000000C3DF90
0x0000000000C9B2C0)
0x0000000140E90503 (0x0000000000C9B2C0 0x00000000029F94B0 0x0000000000000000
0x0000000000000000)
0x00000001416B27D5 (0x0000000000000000 0x0000000000ACDF00 0x0000000000C3DBF0
0xFFFFFFFF00000002)
0x0000000140B8152D (0x0000000000C3DBF0 0x0000000000000000 0x000000000000006E
0x0000000000000005)
0x0000000140E8FE93 (0x000000014386F568 0x0000000000000000 0x0000000000000001
0x0000000000000000)
0x0000000140B813D9 (0x0000000000000000 0x0000000000C32400 0x0000000000C35B90
0x0000000000000000)
0x0000000140B4A19D (0x0000000140928B60 0x0000000000C3DBF0 0x0000000000ACE269
0x0000000140928C50)
0x0000000140C4832D (0x0000000000ACE318 0x0000000000C32280 0x0000000000C32320
0x0000000000C347C8)
0x000000013FEB337E (0x0000000000000040 0x0000000000000000 0x0000000143855020
0x0000000000ACE9E0)
0x000000013FEA97FA (0x0000000000000008 0x0000000000C3CC22 0x0000000000ACEA40
0x0000000000000000)
0x000000013FEAF9DE (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000)
0x00000001423DA927 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000)
0x00000000777F59ED (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000), BaseThreadInitThunk() + 0xD bytes(s)
0x000000007792C541 (0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s)

This bug was found at the same time as bug 23137 and may be related.

-- 
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/20150406/aabca34a/attachment.html>


More information about the llvm-bugs mailing list