[cfe-dev] Clang crashing unexpectedly
Zoe Carver via cfe-dev
cfe-dev at lists.llvm.org
Fri Mar 15 19:18:01 PDT 2019
I found that clang crashes when it should not. I brought up the issue in
the LLVM IRC channel earlier and was told to send an email describing the
problem (the LLVM Bugzilla has not verified me yet).
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);
Here is a Godbolt to help demonstrate the problem:
https://godbolt.org/z/L1v1rs
I *think *(but totally might be wrong) that the issue has to do with clang
("CGBuiltin.cpp") returning a different type than was specified in
"Builtins.def".
Anyway, let me know if you have questions. Hope this helps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190315/de6e6480/attachment.html>
More information about the cfe-dev
mailing list