<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 - WebAssembly exception handling catchpads cannot be addressed sometimes"
href="https://bugs.llvm.org/show_bug.cgi?id=46396">46396</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>WebAssembly exception handling catchpads cannot be addressed sometimes
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</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>Backend: WebAssembly
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>sascha.braun.lpz@googlemail.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=23634" name="attach_23634" title="code sample (cpp)">attachment 23634</a> <a href="attachment.cgi?id=23634&action=edit" title="code sample (cpp)">[details]</a></span>
code sample (cpp)
-- I think this shall be forwarded to Heejin Ahn. --
Hi,
I'm in the process of implementing several WebAssembly VMs, including EH,
working with what is so far already present in LLVM.
I think there is a bug in how codegen is done when catchpads are nested. The EH
table I think is fine.
Please see attached cpp sample.
Function test23any_nest1_llvm: I think it is impossible to execute the code in
the inner catch for both test3class and test5class. One catchpad can be
executed if my _Unwind_CallPersonality() writes it's according EH table entry
back to memory address 0.
Function test23any_nest1: Here it is ok. Inner CPs for both types can be
exec'd, I think it is because catches for both types are also present in the
outer try/catch.
My assumption is it is related to how child catchpads are deleted in
'wasmehlateprepare'.
You can contact me directly <a href="mailto:sascha.braun.lpz@googlemail.com">sascha.braun.lpz@googlemail.com</a>. If I am wrong I
would be grateful if you could point out what value _Unwind_CallPersonality
shall write to memory addr 0 to select the catch for test3class or test5class.
Many Thanks
Sascha</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>