<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - Deleting MCJIT execution engine causes SIGSEGV, Segmentation fault in "__cxa_throw""
href="https://llvm.org/bugs/show_bug.cgi?id=30910">30910</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Deleting MCJIT execution engine causes SIGSEGV, Segmentation fault in "__cxa_throw"
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>3.9
</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>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>MCJIT
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alex.moiseenko@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>The scenario is similar to the reported bug here:
<a href="https://groups.google.com/forum/#!topic/llvm-dev/MQOJJa-uFSo">https://groups.google.com/forum/#!topic/llvm-dev/MQOJJa-uFSo</a>
Basically its like this:
1. Create MCJIT ExecutionEngine.
2. Delete ExecutionEngine.
3. Call try-catch block after it.
When try/catch block is used after ExecutionEngine is deleted, I get the
following segmentation fault:
-------------------------------
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff712632e in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
(gdb) where
#0 0x00007ffff712632e in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#1 0x00007ffff7126829 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#2 0x00007ffff71270c6 in _Unwind_Find_FDE ()
from /lib/x86_64-linux-gnu/libgcc_s.so.1
#3 0x00007ffff7123b63 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#4 0x00007ffff7124d80 in ?? () from /lib/x86_64-linux-gnu/libgcc_s.so.1
#5 0x00007ffff712522e in _Unwind_RaiseException ()
from /lib/x86_64-linux-gnu/libgcc_s.so.1
#6 0x00007ffff76c190c in __cxa_throw ()
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x0000000000b5ed35 in main ()
at /home/gavgav/Documents/testllvm/testllvm.cpp:839
-------------------------------
The issue is reproducible only on Linux (works on Windows). Linux distribution
is Ubuntu 16.04 x64.
I found that if I comment the line "Dyld.deregisterEHFrames();" inside MCJIT
destructor, then the issue disappears. So its something with dynamic linker
exception handler frames deregistration.</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>