New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Front end crash on short (66 byte) code snippet #79745
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
duplicate
Resolved as duplicate
Comments
EugeneZelenko
added
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
and removed
new issue
labels
Jan 28, 2024
@llvm/issue-subscribers-clang-frontend Author: Tony E Lewis (tonyelewis)
Running `clang++ a.cpp` with up to date build (`987087df90026605fc8d03ebda5a1cd31b71e609`, 2024-01-23) on:
template <typename = int> struct a;
auto f() {
a c;
return c;
} (demonstrated: https://godbolt.org/z/4jv8E7ns8) …gives:
|
Using a debug build of clang of commit Full output:
|
Duplicate of: #63244 Although this case looks slightly simpler. |
shafik
added a commit
to shafik/llvm-project
that referenced
this issue
Jan 29, 2024
…rrors In Sema in `BuildReturnStmt(...)` when we try to determine is the type is move eligable or copy elidable we don't currently check of the init of the `VarDecl` contain errors or not. This can lead to a crash since we may send a type that is not complete into `getTypeInfo(...)` which does not allow this. This fixes: llvm#63244 llvm#79745
shafik
added a commit
to shafik/llvm-project
that referenced
this issue
Jan 29, 2024
…rrors In Sema in `BuildReturnStmt(...)` when we try to determine is the type is move eligable or copy elidable we don't currently check of the init of the `VarDecl` contain errors or not. This can lead to a crash since we may send a type that is not complete into `getTypeInfo(...)` which does not allow this. This fixes: llvm#63244 llvm#79745
shafik
added a commit
to shafik/llvm-project
that referenced
this issue
Jan 29, 2024
…rrors In Sema in `BuildReturnStmt(...)` when we try to determine is the type is move eligable or copy elidable we don't currently check of the init of the `VarDecl` contain errors or not. This can lead to a crash since we may send a type that is not complete into `getTypeInfo(...)` which does not allow this. This fixes: llvm#63244 llvm#79745
shafik
added a commit
that referenced
this issue
Jan 29, 2024
…rrors (#79788) In Sema in `BuildReturnStmt(...)` when we try to determine is the type is move eligible or copy elidable we don't currently check of the init of the `VarDecl` contain errors or not. This can lead to a crash since we may send a type that is not complete into `getTypeInfo(...)` which does not allow this. This fixes: #63244 #79745
Thank you so much for very quickly fixing this (via #63244, which it duplicated). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
crash
Prefer [crash-on-valid] or [crash-on-invalid]
duplicate
Resolved as duplicate
Running
clang++ a.cpp
with up to date build (987087df90026605fc8d03ebda5a1cd31b71e609
, 2024-01-23) on:(demonstrated: https://godbolt.org/z/4jv8E7ns8)
…gives:
The text was updated successfully, but these errors were encountered: