-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Assertion `e->isUnique() && "LValue for a nonunique OVE hasn't been emitted"' failed #45309
Comments
Further reduced: clang-11: /opt/llvm/clang/lib/CodeGen/CGExpr.cpp:4647: clang::CodeGen::LValue clang::CodeGen::CodeGenFunction::getOrCreateOpaqueLValueMapping(const clang::OpaqueValueExpr ): Assertion `e->isUnique() && "LValue for a nonunique OVE hasn't been emitted"' failed. |
I submitted a patch for this: https://reviews.llvm.org/D108482 |
This was fixed between 13 and 14 code
old dump
|
@llvm/issue-subscribers-clang-codegen |
Extended Description
The following code:
struct A {
using B = void (*)();
B c;
};
class D {
static const A e[];
};
class F {
public:
struct G {
unsigned h[2];
};
template I get();
};
template void j();
template <typename = void> struct K;
template <> struct K<> {
template static void m() {
F n;
auto o = n.get<F::G>();
auto [p, q] = o.h;
j();
}
};
const A D::e[]{K<>::m<0>};
makes clang to crash with:
Stack dump:
0. Program arguments: clang++-10 --std=c++17 -c crash.cpp
/usr/lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x1f)[0x7f00a985890f]
/usr/lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys17RunSignalHandlersEv+0x50)[0x7f00a9856bc0]
/usr/lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm3sys15CleanupOnSignalEm+0xdd)[0x7f00a985805d]
/usr/lib/x86_64-linux-gnu/libLLVM-10.so.1(+0x9b43f0)[0x7f00a97aa3f0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x14110)[0x7f00b016a110]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(+0x16388d9)[0x7f00aebc98d9]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen15CodeGenFunction14EmitScalarExprEPKNS_4ExprEb+0x4f)[0x7f00aebba8af]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen15CodeGenFunction11EmitAnyExprEPKNS_4ExprENS0_12AggValueSlotEb+0x38)[0x7f00aeb79e98]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen15CodeGenFunction15EmitIgnoredExprEPKNS_4ExprE+0x59)[0x7f00aeb79e49]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen15CodeGenFunction8EmitStmtEPKNS_4StmtEN4llvm8ArrayRefIPKNS_4AttrEEE+0x194)[0x7f00aecadb14]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen15CodeGenFunction28EmitCompoundStmtWithoutScopeERKNS_12CompoundStmtEbNS0_12AggValueSlotE+0x8c)[0x7f00aecb784c]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen15CodeGenFunction16EmitFunctionBodyEPKNS_4StmtE+0x112)[0x7f00aecf91b2]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen15CodeGenFunction12GenerateCodeENS_10GlobalDeclEPN4llvm8FunctionERKNS0_14CGFunctionInfoE+0x2cf)[0x7f00aecf9a0f]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen13CodeGenModule28EmitGlobalFunctionDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE+0x14d)[0x7f00aed1124d]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen13CodeGenModule20EmitGlobalDefinitionENS_10GlobalDeclEPN4llvm11GlobalValueE+0x1d3)[0x7f00aed0b3e3]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0x91)[0x7f00aed02501]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen13CodeGenModule12EmitDeferredEv+0xad)[0x7f00aed0251d]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang7CodeGen13CodeGenModule7ReleaseEv+0x17)[0x7f00aed01887]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(+0x17f2434)[0x7f00aed83434]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(+0x17600ad)[0x7f00aecf10ad]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang8ParseASTERNS_4SemaEbb+0x283)[0x7f00adedf163]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang14FrontendAction7ExecuteEv+0x48)[0x7f00af3553a8]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang16CompilerInstance13ExecuteActionERNS_14FrontendActionE+0x621)[0x7f00af30ddf1]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang25ExecuteCompilerInvocationEPNS_16CompilerInstanceE+0x66f)[0x7f00af3b92ff]
clang++-10(_Z8cc1_mainN4llvm8ArrayRefIPKcEES2_Pv+0x98d)[0x412e3d]
clang++-10[0x411151]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(+0x1acde42)[0x7f00af05ee42]
/usr/lib/x86_64-linux-gnu/libLLVM-10.so.1(_ZN4llvm20CrashRecoveryContext9RunSafelyENS_12function_refIFvvEEE+0xd7)[0x7f00a97aa1f7]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZNK5clang6driver10CC1Command7ExecuteEN4llvm8ArrayRefINS2_8OptionalINS2_9StringRefEEEEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPb+0x13f)[0x7f00af05e37f]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(ZNK5clang6driver11Compilation14ExecuteCommandERKNS0_7CommandERPS3+0x2df)[0x7f00af036a7f]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZNK5clang6driver11Compilation11ExecuteJobsERKNS0_7JobListERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0x7a)[0x7f00af036c2a]
/usr/lib/x86_64-linux-gnu/libclang-cpp.so.10(_ZN5clang6driver6Driver18ExecuteCompilationERNS0_11CompilationERN4llvm15SmallVectorImplISt4pairIiPKNS0_7CommandEEEE+0xdc)[0x7f00af049e8c]
clang++-10(main+0x259f)[0x410bcf]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb)[0x7f00a892be0b]
clang++-10(_start+0x2a)[0x40e36a]
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 10.0.0-4
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/user/1000/crash-89a527.cpp
clang: note: diagnostic msg: /tmp/user/1000/crash-89a527.sh
clang: note: diagnostic msg:
The text was updated successfully, but these errors were encountered: