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

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

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:

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to