LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 15902 - clang::CXXBasePaths::lookupInBases crash
Summary: clang::CXXBasePaths::lookupInBases crash
Status: NEW
Alias: None
Product: libraries
Classification: Unclassified
Component: Core LLVM classes (show other bugs)
Version: 3.2
Hardware: PC Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-03 03:10 PDT by noelgrandin@gmail.com
Modified: 2013-05-03 08:37 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
preprocessed source (926.51 KB, application/x-bzip)
2013-05-03 03:10 PDT, noelgrandin@gmail.com
Details
runscript (1.20 KB, application/x-shellscript)
2013-05-03 03:11 PDT, noelgrandin@gmail.com
Details
plugin cpp file (8.71 KB, text/x-c++src)
2013-05-03 03:12 PDT, noelgrandin@gmail.com
Details
plugin header file (625 bytes, text/x-c++hdr)
2013-05-03 03:12 PDT, noelgrandin@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description noelgrandin@gmail.com 2013-05-03 03:10:18 PDT
Created attachment 10459 [details]
preprocessed source

I'm running a clang plugin and it's crashing on some of the input files with a stacktrace:

0  libLLVM-3.2svn.so 0x00000039b376c42f
1  libLLVM-3.2svn.so 0x00000039b376c886
2  libpthread.so.0   0x00000034d1a0f000
3  clang             0x0000000000f7a1d6 clang::CXXBasePaths::lookupInBases(clang::ASTContext&, clang::CXXRecordDecl const*, bool (*)(clang::CXXBaseSpecifier const*, clang::CXXBasePath&, void*), void*) + 102
4  clang             0x0000000000f7b1f7 clang::CXXRecordDecl::lookupInBases(bool (*)(clang::CXXBaseSpecifier const*, clang::CXXBasePath&, void*), void*, clang::CXXBasePaths&) const + 55
5  clang             0x0000000000f7b713 clang::CXXRecordDecl::isDerivedFrom(clang::CXXRecordDecl const*) const + 259
6  plugin.so         0x00002aaaaab1c967 loplugin::ReferenceCasting::VisitCXXConstructExpr(clang::CXXConstructExpr*) + 855
7  plugin.so         0x00002aaaaab21732 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseCXXConstructExpr(clang::CXXConstructExpr*) + 18
8  plugin.so         0x00002aaaaab1e946 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseStmt(clang::Stmt*) + 310
9  plugin.so         0x00002aaaaab292d2 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseVarHelper(clang::VarDecl*) + 114
10 plugin.so         0x00002aaaaab1d110 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDecl(clang::Decl*) + 1360
11 plugin.so         0x00002aaaaab20cb2 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDeclStmt(clang::DeclStmt*) + 98
12 plugin.so         0x00002aaaaab1e8d5 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseStmt(clang::Stmt*) + 197
13 plugin.so         0x00002aaaaab20b9a clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseCompoundStmt(clang::CompoundStmt*) + 186
14 plugin.so         0x00002aaaaab1e8c7 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseStmt(clang::Stmt*) + 183
15 plugin.so         0x00002aaaaab20aca clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseCXXTryStmt(clang::CXXTryStmt*) + 186
16 plugin.so         0x00002aaaaab1e8c0 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseStmt(clang::Stmt*) + 176
17 plugin.so         0x00002aaaaab20b9a clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseCompoundStmt(clang::CompoundStmt*) + 186
18 plugin.so         0x00002aaaaab1e8c7 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseStmt(clang::Stmt*) + 183
19 plugin.so         0x00002aaaaab2958c clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseFunctionHelper(clang::FunctionDecl*) + 412
20 plugin.so         0x00002aaaaab1cc13 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDecl(clang::Decl*) + 83
21 plugin.so         0x00002aaaaab1e7f1 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDeclContextHelper(clang::DeclContext*) + 49
22 plugin.so         0x00002aaaaab1d301 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDecl(clang::Decl*) + 1857
23 plugin.so         0x00002aaaaab1e7f1 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDeclContextHelper(clang::DeclContext*) + 49
24 plugin.so         0x00002aaaaab1d301 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDecl(clang::Decl*) + 1857
25 plugin.so         0x00002aaaaab1e7f1 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDeclContextHelper(clang::DeclContext*) + 49
26 plugin.so         0x00002aaaaab1d301 clang::RecursiveASTVisitor<loplugin::ReferenceCasting>::TraverseDecl(clang::Decl*) + 1857
27 plugin.so         0x00002aaaaab4823e loplugin::PluginHandler::HandleTranslationUnit(clang::ASTContext&) + 94
28 clang             0x000000000063eb8d clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 61
29 clang             0x00000000008adb84 clang::ParseAST(clang::Sema&, bool, bool) + 340
30 clang             0x0000000000768fd3 clang::CodeGenAction::ExecuteAction() + 51
31 clang             0x0000000000629f21 clang::FrontendAction::Execute() + 97
32 clang             0x000000000060be3a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 282
33 clang             0x00000000005f486d clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1565
34 clang             0x00000000005eda88 cc1_main(char const**, char const**, char const*, void*) + 1176
35 clang             0x00000000005ec8fa main + 7034
36 libc.so.6         0x00000034d1621a05 __libc_start_main + 245
37 clang             0x00000000005ed431
Comment 1 noelgrandin@gmail.com 2013-05-03 03:11:09 PDT
Created attachment 10460 [details]
runscript
Comment 2 noelgrandin@gmail.com 2013-05-03 03:12:00 PDT
Created attachment 10461 [details]
plugin cpp file
Comment 3 noelgrandin@gmail.com 2013-05-03 03:12:33 PDT
Created attachment 10462 [details]
plugin header file
Comment 4 noelgrandin@gmail.com 2013-05-03 03:13:24 PDT
Note that this is a fairly rare crash. 
On the whole LibreOffice codebase, it is crashing in about 4 or 5 files.