<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 - ThinLTO: infinite recursion in ThinLTOBitcodeWriter.cpp:245"
   href="https://bugs.llvm.org/show_bug.cgi?id=32121">32121</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ThinLTO: infinite recursion in ThinLTOBitcodeWriter.cpp:245
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>new bugs
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18045" name="attach_18045" title="private_virtual_destructor.cc">attachment 18045</a> <a href="attachment.cgi?id=18045&action=edit" title="private_virtual_destructor.cc">[details]</a></span>
private_virtual_destructor.cc

Consider the following C++ file:

$ cat private_virtual_destructor.cc
class a {
public:
  virtual ~a();
};
namespace __cxxabiv1 {
class __si_class_type_info : public a {
  ~__si_class_type_info();
};
__si_class_type_info::~__si_class_type_info() {}
}

Let's try to compile it:

$ clang++ -flto=thin -O2 -c private_virtual_destructor.cc -o
private_virtual_destructor.o

And...

#0 0x0000000001f5daff llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Support/Unix/Signals.inc:406:0
#1 0x0000000001f5bb0e llvm::sys::RunSignalHandlers()
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Support/Signals.cpp:45:0
#2 0x0000000001f5bc7c SignalHandler(int)
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Support/Unix/Signals.inc:246:0
#3 0x00007fef0b0bc330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00000000027e8284 (anonymous
namespace)::forEachVirtualFunction(llvm::Constant*, llvm::function_ref<void
(llvm::Function*)>) [clone .constprop.285]
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:241:0
#5 0x00000000027e8567
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:244:0
#6 0x00000000027e8567
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:245:0
#7 0x00000000027e8567
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:245:0
#8 0x00000000027e8567
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:245:0
...
...
...
#1255 0x00000000027e8567
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:244:0
#1256 0x00000000027e8567
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:245:0
#1257 0x00000000027e8567
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:245:0
#1258 0x00000000027e8567
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:245:0
#1259 0x00000000027e8567 (anonymous
namespace)::forEachVirtualFunction(llvm::Constant*, llvm::function_ref<void
(llvm::Function*)>) [clone .constprop.285]
/usr/local/google/home/krasin/src/llvm.org/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:245:0
Stack dump:
0.      Program arguments:
/usr/local/google/home/krasin/src/llvm.org/release-build/bin/clang-5.0 -cc1
-triple x86_64-unknown-linux-gnu -emit-llvm-bc -flto=thin -flto-unit
-disable-free -main-file-name private_virtual_destructor.cc -mrelocation-model
static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/usr/local/google/home/krasin/chr33/src/private_virtual_destructor.gcno
-resource-dir
/usr/local/google/home/krasin/src/llvm.org/release-build/lib/clang/5.0.0
-internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/google/home/krasin/src/llvm.org/release-build/lib/clang/5.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O2
-fdeprecated-macro -fdebug-compilation-dir
/usr/local/google/home/krasin/chr33/src -ferror-limit 19 -fmessage-length 0
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-vectorize-loops -vectorize-slp -o private_virtual_destructor.o -x c++
private_virtual_destructor.cc 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'ThinLTO Bitcode Writer' on module
'private_virtual_destructor.cc'.
clang-5.0: error: unable to execute command: Segmentation fault (core dumped)
clang-5.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.0 (trunk 296778)</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>