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: unassignedclangb...@nondot.org
          Reporter: z.zoel...@gmail.com
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to