<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 --- - SjLjEHPrepare::doInitialization() is broken"
href="https://llvm.org/bugs/show_bug.cgi?id=26669">26669</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>SjLjEHPrepare::doInitialization() is broken
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</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>mehdi.amini@apple.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>Try with any code that contains an invoke to run globaldce and sjljehprepare,
LLVM is crashing:
opt -globaldce -sjljehprepare test/CodeGen/X86/funclet-layout.ll
0 opt 0x00000001053c1e9b
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 opt 0x00000001053c10c6 llvm::sys::RunSignalHandlers() +
70
2 opt 0x00000001053c255f SignalHandler(int) + 383
3 libsystem_platform.dylib 0x00007fff8595c52a _sigtramp + 26
4 libsystem_platform.dylib 0x00007ffa39500190 _sigtramp + 3015326848
5 opt 0x0000000104f79373
llvm::FPPassManager::runOnFunction(llvm::Function&) + 547
6 opt 0x0000000104f795cb
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
7 opt 0x0000000104f79a3e
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 782
8 opt 0x000000010469a8c2 main + 9362
9 libdyld.dylib 0x00007fff926cf5ad start + 1
Stack dump:
0. Program arguments: ./bin/opt -globaldce -sjljehprepare
../llvm/test//CodeGen/X86/funclet-layout.ll
1. Running pass 'Function Pass Manager' on module
'../llvm/test//CodeGen/X86/funclet-layout.ll'.
2. Running pass 'SJLJ Exception Handling preparation' on function '@test1'
Segmentation fault: 11
The reason is that it creates declarations during initialization and expects
these to survive till it runOnFunction is called.
This is obviously a broken assumption.</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>