[LLVMbugs] [Bug 14029] New: Assertion failed: (!N->getContext().pImpl->MDNodeSet.RemoveNode(N) && "Deleting a non-temporary uniqued node!"), function deleteTemporary, file llvm/lib/VMCore/Metadata.cpp, line 293.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 4 16:46:00 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14029

             Bug #: 14029
           Summary: Assertion failed:
                    (!N->getContext().pImpl->MDNodeSet.RemoveNode(N) &&
                    "Deleting a non-temporary uniqued node!"), function
                    deleteTemporary, file llvm/lib/VMCore/Metadata.cpp,
                    line 293.
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: st at quanttec.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


When compiling the following snippet with the latest trunk version of
clang/llvm I get the assertion error and stack trace pasted below the code.
This doesn't happen with Xcode 4.5's clang.

// compiled with clang++ -std=c++11

template <typename T>
class Test {
public:
    enum class Tag {
        test = 0
    };

    Test() {
       auto t = Tag::test;
    }

    Tag tag() const { return static_cast<Tag>(1); }
};


int main() {
    Test<int> t;
}

Assertion failed: (!N->getContext().pImpl->MDNodeSet.RemoveNode(N) && "Deleting
a non-temporary uniqued node!"), function deleteTemporary, file
.../llvm/lib/VMCore/Metadata.cpp, line 293.
0  clang             0x0000000102a87c42
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 16130
1  clang             0x0000000102a88129
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 17385
2  libsystem_c.dylib 0x00007fff90d2a8ea _sigtramp + 26
3  libsystem_c.dylib 0x00007feda8c03ad0 _sigtramp + 18446743996801585664
4  clang             0x0000000102a87e86
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 16710
5  clang             0x0000000102a87e45
llvm::SmallVectorImpl<char>::swap(llvm::SmallVectorImpl<char>&) + 16645
6  clang             0x0000000102a1b2f2 void*
llvm::object_creator<llvm::LeakDetectorImpl<void> >() + 3362
7  clang             0x00000001017b10be
std::vector<clang::serialization::ModuleFile*,
std::allocator<clang::serialization::ModuleFile*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::serialization::ModuleFile**,
std::vector<clang::serialization::ModuleFile*,
std::allocator<clang::serialization::ModuleFile*> > >,
clang::serialization::ModuleFile* const&) + 271262
8  clang             0x0000000101850778 std::vector<std::pair<unsigned int,
unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> >
>::operator=(std::vector<std::pair<unsigned int, unsigned int>,
std::allocator<std::pair<unsigned int, unsigned int> > > const&) + 26824
9  clang             0x0000000101849a1d llvm::ParseIR(llvm::MemoryBuffer*,
llvm::SMDiagnostic&, llvm::LLVMContext&) + 1405
10 clang             0x0000000101881b24 std::vector<std::pair<llvm::WeakVH,
llvm::Constant*>, std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> >
>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::pair<llvm::WeakVH,
llvm::Constant*>*, std::vector<std::pair<llvm::WeakVH, llvm::Constant*>,
std::allocator<std::pair<llvm::WeakVH, llvm::Constant*> > > >,
std::pair<llvm::WeakVH, llvm::Constant*> const&) + 57108
11 clang             0x0000000101848cf0 std::vector<clang::CXXRecordDecl
const*, std::allocator<clang::CXXRecordDecl const*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CXXRecordDecl const**,
std::vector<clang::CXXRecordDecl const*, std::allocator<clang::CXXRecordDecl
const*> > >, clang::CXXRecordDecl const* const&) + 6080
12 clang             0x000000010165818b std::_Rb_tree<clang::edit::FileOffset,
std::pair<clang::edit::FileOffset const, clang::edit::EditedSource::FileEdit>,
std::_Select1st<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >, std::less<clang::edit::FileOffset>,
std::allocator<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >
>::_M_erase(std::_Rb_tree_node<std::pair<clang::edit::FileOffset const,
clang::edit::EditedSource::FileEdit> >*) + 3755
13 clang             0x000000010162ddef std::vector<clang::CompilerInstance*,
std::allocator<clang::CompilerInstance*>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<clang::CompilerInstance**,
std::vector<clang::CompilerInstance*, std::allocator<clang::CompilerInstance*>
> >, clang::CompilerInstance* const&) + 16223
14 clang             0x00000001015f7769 std::_Rb_tree<std::string, std::string,
std::_Identity<std::string>, std::less<std::string>,
std::allocator<std::string> >::_M_insert_unique(std::string const&) + 4153
15 clang             0x00000001015edfc5
16 clang             0x00000001015f37e4 std::vector<std::string,
std::allocator<std::string>
>::_M_insert_aux(__gnu_cxx::__normal_iterator<std::string*,
std::vector<std::string, std::allocator<std::string> > >, std::string const&) +
1476
17 libdyld.dylib     0x00007fff92cf37e1 start + 0
Stack dump:
0.    Program arguments: /opt/llvm/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -main-file-name
test.cpp -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 134.9 -g -resource-dir
/opt/llvm/bin/../lib/clang/3.2 -fmodule-cache-path
/var/folders/1r/8c_219ns79j6kw0cs2ysw1240000gn/T/clang-module-cache -std=c++11
-fdeprecated-macro -fdebug-compilation-dir .../test -ferror-limit 19
-fmessage-length 120 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/1r/8c_219ns79j6kw0cs2ysw1240000gn/T/test-bgccYX.o -x c++ test.cpp 
1.    <eof> parser at end of file
2.    Per-file LLVM IR generation
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 165260)
Target: x86_64-apple-darwin12.2.0
Thread model: posix

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list