<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 - Coroutine builtin causing clang to crash"
href="https://bugs.llvm.org/show_bug.cgi?id=41103">41103</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Coroutine builtin causing clang to crash
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>z.zoelec2@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Many (but not all) coroutine builtins crash clang when used. I also brought up
this issue on the mailing list and IRC channel.
Here is a simple example of a program which crashes:
int main () {
return __builtin_coro_size();
}
This behavior happens with many of the coroutine builtins. Take another
example:
void* alloc = malloc(1024);
void* ptr = __builtin_coro_begin(alloc);
return __builtin_coro_free(ptr);
None of those coroutine builtins *seem* to be used in the codebase so it might
be okay to remove them. The ones that are used (such as "__builtin_coro_resume"
or "__builtin_coro_destroy") seem to work fine.
Here is a Godbolt to help demonstrate the problem: <a href="https://godbolt.org/z/L1v1rs">https://godbolt.org/z/L1v1rs</a></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>