[LLVMbugs] [Bug 21547] New: Clang codegen asserts "An asserting value handle still pointed to this value!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 12 06:13:13 PST 2014


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

            Bug ID: 21547
           Summary: Clang codegen asserts "An asserting value handle still
                    pointed to this value!"
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: vvasilev at cern.ch
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Index: Inputs/PRN2/module.modulemap
===================================================================
--- Inputs/PRN2/module.modulemap    (revision 0)
+++ Inputs/PRN2/module.modulemap    (revision 0)
@@ -0,0 +1,4 @@
+module M {
+  header "FirstHeader.h"
+  export *
+}
Index: Inputs/PRN2/FirstHeader.h
===================================================================
--- Inputs/PRN2/FirstHeader.h    (revision 0)
+++ Inputs/PRN2/FirstHeader.h    (revision 0)
@@ -0,0 +1,14 @@
+template<class Element> struct TMatrixT;
+typedef TMatrixT<double> TMatrixD;
+
+void f(const TMatrixD &m);
+
+template<class Element> struct TMatrixT {
+   template <class Element2> TMatrixT(const TMatrixT<Element2> &);
+   ~TMatrixT() {}
+   void Determinant () { f(*this); }
+
+};
+
+template struct TMatrixT<float>;
+template struct TMatrixT<double>;
Index: prN2.cpp
===================================================================
--- prN2.cpp    (revision 0)
+++ prN2.cpp    (revision 0)
@@ -0,0 +1,4 @@
+// RUN: rm -rf %t
+// RUN: %clang -fmodules -fmodules-cache-path=%t -x c++ %s
+
+#include "Inputs/PRN2/FirstHeader.h"


// Crash:

/home/vvassilev/workspace/llvm/obj/Debug+Asserts/bin/clang -fmodules
-fmodules-cache-path=/home/vvassilev/workspace/llvm/obj/tools/clang/test/Modules/Output/prN2.cpp.tmp
-x c++ /home/vvassilev/workspace/llvm/src/tools/clang/test/Modules/prN2.cpp
While deleting: void (%struct.TMatrixT.0*)* %
An asserting value handle still pointed to this value!
UNREACHABLE executed at
/home/vvassilev/workspace/llvm/src/lib/IR/Value.cpp:765!
0  clang           0x000000000393ad7e llvm::sys::PrintStackTrace(_IO_FILE*) +
46
1  clang           0x000000000393bb3b
2  clang           0x000000000393de34
3  libpthread.so.0 0x00007f1acdea1cb0
4  libc.so.6       0x00007f1acccb70d5 gsignal + 53
5  libc.so.6       0x00007f1acccba83b abort + 379
6  clang           0x000000000391c8f6
7  clang           0x00000000038c20fc
llvm::ValueHandleBase::ValueIsDeleted(llvm::Value*) + 716
8  clang           0x00000000038c1c9c llvm::Value::~Value() + 60
9  clang           0x00000000036653b8
10 clang           0x0000000003665355
11 clang           0x000000000385ee7b
12 clang           0x000000000377efe1
13 clang           0x000000000377ec16 llvm::Function::~Function() + 246
14 clang           0x000000000377eb09 llvm::Function::~Function() + 25
15 clang           0x0000000002864dfe
16 clang           0x0000000002864588
17 clang           0x000000000377db35 llvm::Function::eraseFromParent() + 69
18 clang           0x0000000000e8dd1a
19 clang           0x0000000000e8d770
20 clang           0x0000000000dc338b
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) + 491
21 clang           0x0000000000dc581c
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) + 876
22 clang           0x0000000000e89ed0
23 clang           0x0000000000dc8faf
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 847
24 clang           0x0000000000d1f00d
25 clang           0x0000000000d06b48
26 clang           0x00000000023c7d87
clang::ASTConsumer::HandleInterestingDecl(clang::DeclGroupRef) + 55
27 clang           0x0000000000b97a81
clang::ASTReader::PassInterestingDeclToConsumer(clang::Decl*) + 129
28 clang           0x0000000000b978c6
clang::ASTReader::PassInterestingDeclsToConsumer() + 214
29 clang           0x0000000000ba4c82 clang::ASTReader::FinishedDeserializing()
+ 178
30 clang           0x0000000000ba4cac non-virtual thunk to
clang::ASTReader::FinishedDeserializing() + 28
31 clang           0x0000000000b6f92c
32 clang           0x0000000000c1c3f1 clang::ASTReader::ReadDeclRecord(unsigned
int) + 4289
33 clang           0x0000000000b8775c clang::ASTReader::GetDecl(unsigned int) +
188
34 clang           0x0000000000b97ce3
clang::ASTReader::StartTranslationUnit(clang::ASTConsumer*) + 131
35 clang           0x0000000000b97d4f non-virtual thunk to
clang::ASTReader::StartTranslationUnit(clang::ASTConsumer*) + 47
36 clang           0x0000000001038229 clang::ParseAST(clang::Sema&, bool, bool)
+ 313
37 clang           0x00000000009a6cb9 clang::ASTFrontendAction::ExecuteAction()
+ 345
38 clang           0x0000000000d063c7 clang::CodeGenAction::ExecuteAction() +
1527
39 clang           0x00000000009a64c8 clang::FrontendAction::Execute() + 120
40 clang           0x0000000000962ad8
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 824
41 clang           0x0000000000919b17
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1063
42 clang           0x0000000000902245 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 741
43 clang           0x0000000000911c3b
44 clang           0x0000000000910d14 main + 1028
45 libc.so.6       0x00007f1accca276d __libc_start_main + 237
46 clang           0x0000000000901609
Stack dump:
0.    Program arguments:
/home/vvassilev/workspace/llvm/obj/Debug+Asserts/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
prN2.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -target-linker-version 2.22
-dwarf-column-info -resource-dir
/home/vvassilev/workspace/llvm/obj/Debug+Asserts/bin/../lib/clang/3.6.0
-internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward
-internal-isystem /usr/local/include -internal-isystem
/home/vvassilev/workspace/llvm/obj/Debug+Asserts/bin/../lib/clang/3.6.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fdebug-compilation-dir
/home/vvassilev/workspace/llvm/obj/tools/clang -ferror-limit 19
-fmessage-length 178 -mstackrealign -fmodules
-fmodules-cache-path=/home/vvassilev/workspace/llvm/obj/tools/clang/test/Modules/Output/prN2.cpp.tmp
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/prN2-74f79e.o -x c++
/home/vvassilev/workspace/llvm/src/tools/clang/test/Modules/prN2.cpp 
1.    /home/vvassilev/workspace/llvm/src/tools/clang/test/Modules/prN2.cpp:4:1:
at annotation token
2.   
/home/vvassilev/workspace/llvm/src/tools/clang/test/Modules/Inputs/PRN2/FirstHeader.h:8:4:
LLVM IR generation of declaration 'TMatrixT<double>::~TMatrixT'
3.   
/home/vvassilev/workspace/llvm/src/tools/clang/test/Modules/Inputs/PRN2/FirstHeader.h:8:4:
Generating code for declaration 'TMatrixT<double>::~TMatrixT'

-- 
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/20141112/31016b9b/attachment.html>


More information about the llvm-bugs mailing list