[LLVMbugs] [Bug 21449] New: Assertion EST != EST_Unevaluated && EST != EST_Uninstantiated with destructor and uniform initialization
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Nov 2 03:51:04 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=21449
Bug ID: 21449
Summary: Assertion EST != EST_Unevaluated && EST !=
EST_Uninstantiated with destructor and uniform
initialization
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangbugs at nondot.org
Reporter: jonathan.sauer at gmx.de
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 13271
--> http://llvm.org/bugs/attachment.cgi?id=13271&action=edit
log of clang execution
The following code crashes clang r220759 with an assertion:
struct Bar {
Bar();
~Bar();
};
struct Foo {
Bar a, b;
};
Foo* makeFoo()
{
return new Foo {
/*Bar*/{ },
/*Bar*/{ }
};
}
This results in (full log attached):
% ~/LLVM/build/Release+Asserts/bin/clang++ -std=c++11 -c clang.cpp
Assertion failed: (EST != EST_Unevaluated && EST != EST_Uninstantiated),
function isNothrow, file
/Users/rynnsauer/LLVM/llvm/tools/clang/lib/AST/Type.cpp, line 1701.
0 clang 0x000000010f157f0f
llvm::sys::PrintStackTrace(__sFILE*) + 47
1 clang 0x000000010f15872b SignalHandler(int) + 555
2 libsystem_platform.dylib 0x00007fff8ffe35aa _sigtramp + 26
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1879165552
4 clang 0x000000010f1584e6 abort + 22
5 clang 0x000000010f1584c1 __assert_rtn + 81
6 clang 0x000000010e4764f0
clang::FunctionProtoType::isNothrow(clang::ASTContext const&, bool) const + 256
7 clang 0x000000010d722130
clang::CodeGen::CodeGenModule::ConstructAttributeList(clang::CodeGen::CGFunctionInfo
const&, clang::Decl const*, llvm::SmallVector<llvm::AttributeSet, 8u>&,
unsigned int&, bool) + 528
8 clang 0x000000010d831af7
clang::CodeGen::CodeGenModule::SetFunctionAttributes(clang::GlobalDecl,
llvm::Function*, bool) + 199
9 clang 0x000000010d833d1b
clang::CodeGen::CodeGenModule::GetOrCreateLLVMFunction(llvm::StringRef,
llvm::Type*, clang::GlobalDecl, bool, bool, llvm::AttributeSet) + 523
10 clang 0x000000010d71b7fb
clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(clang::CXXMethodDecl
const*, clang::CodeGen::StructorType, clang::CodeGen::CGFunctionInfo const*,
llvm::FunctionType*, bool) + 283
11 clang 0x000000010d882f32 (anonymous
namespace)::ItaniumCXXABI::EmitDestructorCall(clang::CodeGen::CodeGenFunction&,
clang::CXXDestructorDecl const*, clang::CXXDtorType, bool, bool, llvm::Value*)
+ 258
[...]
Doing one of the following will make the crash disappear:
- Removing Bar's destructor.
- Changing makeFoo's return type from Foo* to Foo.
- Uncommenting one or both of the Bar's inside makeFoo.
This bug is similar to bug 20619: The same assertion is triggered, however not
in the context of a lambda function.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141102/181c78b9/attachment.html>
More information about the llvm-bugs
mailing list