[LLVMbugs] [Bug 17339] New: clang frontend crashed because of assertion failure in mangleCXXRTTI

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 24 03:12:22 PDT 2013


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

            Bug ID: 17339
           Summary: clang frontend crashed because of assertion failure in
                    mangleCXXRTTI
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: huangjiangwei at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

test case:

#include <typeinfo>

int main()
{
   typeid(char const[10]);
}



clang: ItaniumMangle.cpp:3597: virtual void
{anonymous}::ItaniumMangleContext::m                                           
                                                       
angleCXXRTTI(clang::QualType, llvm::raw_ostream&): Assertion
`!Ty.hasQualifiers(                                                            
                                       ) && "RTTI info cannot have top-level
qualifiers"' failed.
0  clang           0x00000000020f02d2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang           0x00000000020eff61
2  libpthread.so.0 0x000000351740e7c0
3  libc.so.6       0x0000003516c30265 gsignal + 53
4  libc.so.6       0x0000003516c31d10 abort + 272
5  libc.so.6       0x0000003516c296e6 __assert_fail + 246
6  clang           0x000000000125da5f
7  clang           0x0000000000941a3d
8  clang           0x0000000000942eab
clang::CodeGen::CodeGenModule::GetAddrOfRT                                     
                                                             
TIDescriptor(clang::QualType, bool) + 123
9  clang           0x00000000008d6270
clang::CodeGen::CodeGenFunction::EmitCXXTy                                     
                                                             
peidExpr(clang::CXXTypeidExpr const*) + 512
10 clang           0x00000000008b7f4d
clang::CodeGen::CodeGenFunction::EmitCXXTy                                     
                                                             
peidLValue(clang::CXXTypeidExpr const*) + 29
11 clang           0x00000000008c2a85
clang::CodeGen::CodeGenFunction::EmitLValu                                     
                                                              e(clang::Expr
const*) + 117
12 clang           0x00000000008c3508
clang::CodeGen::CodeGenFunction::EmitIgnor                                     
                                                             
edExpr(clang::Expr const*) + 24
13 clang           0x00000000009525f3
clang::CodeGen::CodeGenFunction::EmitStmt(                                     
                                                              clang::Stmt
const*) + 115
14 clang           0x0000000000952baf
clang::CodeGen::CodeGenFunction::EmitCompo                                     
                                                             
undStmtWithoutScope(clang::CompoundStmt const&, bool,
clang::CodeGen::AggValueSl                                                     
                                              ot) + 79
15 clang           0x0000000000807ead
clang::CodeGen::CodeGenFunction::EmitFunct                                     
                                                             
ionBody(clang::CodeGen::FunctionArgList&) + 93
16 clang           0x000000000080c599
clang::CodeGen::CodeGenFunction::GenerateC                                     
                                                             
ode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
+                                                                              
                      1257
17 clang           0x000000000082173c
clang::CodeGen::CodeGenModule::EmitGlobalF                                     
                                                             
unctionDefinition(clang::GlobalDecl) + 572
18 clang           0x000000000082277c
clang::CodeGen::CodeGenModule::EmitGlobalD                                     
                                                             
efinition(clang::GlobalDecl) + 460
19 clang           0x0000000000824774
clang::CodeGen::CodeGenModule::EmitGlobal(                                     
                                                             
clang::GlobalDecl) + 1492
20 clang           0x0000000000824e75
21 clang           0x00000000007fbc8c
22 clang           0x00000000007fb22c
23 clang           0x0000000000972326 clang::ParseAST(clang::Sema&, bool, bool)
                                                                               
                    + 310
24 clang           0x00000000007f9f2c clang::CodeGenAction::ExecuteAction() +
60
25 clang           0x0000000000680b89 clang::FrontendAction::Execute() + 249
26 clang           0x0000000000660245
clang::CompilerInstance::ExecuteAction(cla                                     
                                                             
ng::FrontendAction&) + 357
27 clang           0x0000000000648ff5
clang::ExecuteCompilerInvocation(clang::Co                                     
                                                              mpilerInstance*)
+ 1765
28 clang           0x0000000000640ba8 cc1_main(char const**, char const**, char
                                                                               
                    const*, void*) + 1208
29 clang           0x0000000000646828 main + 2152
30 libc.so.6       0x0000003516c1d994 __libc_start_main + 244
31 clang           0x000000000063f8f9
Stack dump:
0.      Program arguments: /usr/local/bin/clang -cc1 -triple
x86_64-unknown-linu                                                            
                                       x-gnu -emit-obj -mrelax-all
-disable-free -main-file-name test.cpp -mrelocation-                           
                                                                        model
static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases      
                                                                               
              -munwind-tables -fuse-init-array -target-cpu x86-64
-target-linker-version 2.17.                                                   
                                                50.0.6 -resource-dir
/usr/local/bin/../lib/clang/3.3 -internal-isystem /usr/loca                    
                                                                              
l/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1
-i                                                                             
                      nternal-isystem
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../.               
                                                                               
    ./../include/c++/4.8.1/x86_64-unknown-linux-gnu -internal-isystem
/usr/local/bin                                                                 
                                 
/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../include/c++/4.8.1/backwar
                                                                               
                   d -internal-isystem
/usr/local/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../                   
                                                                               
../../../include/x86_64-unknown-linux-gnu/c++/4.8.1 -internal-isystem
/usr/local                                                                     
                              /include -internal-isystem
/usr/local/bin/../lib/clang/3.3/include -internal-ext                          
                                                                        
ernc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro
                                                                               
                    -fdebug-compilation-dir /home/will.huang -ferror-limit 19
-fmessage-length 80 -m                                                         
                                          stackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-excep                               
                                                                    tions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option     
                                                                               
               -vectorize-loops -o /tmp/test-QhqMxn.o -x c++ /tmp/test.cpp
1.      <eof> parser at end of file
2.      /tmp/test.cpp:3:5: LLVM IR generation of declaration 'main'
3.      /tmp/test.cpp:3:5: Generating code for declaration 'main'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocat                                                                        
                           ion)
clang version 3.3 (tags/RELEASE_33/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/                                                          
                                          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/test-gIJ2ct.cpp
clang: note: diagnostic msg: /tmp/test-gIJ2ct.sh
clang: note: diagnostic msg:

-- 
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/20130924/e0b74c1b/attachment.html>


More information about the llvm-bugs mailing list