[llvm-bugs] [Bug 41103] New: Coroutine builtin causing clang to crash
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Mar 16 13:57:51 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41103
Bug ID: 41103
Summary: Coroutine builtin causing clang to crash
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: z.zoelec2 at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
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: https://godbolt.org/z/L1v1rs
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190316/bbc29399/attachment.html>
More information about the llvm-bugs
mailing list