[llvm-bugs] [Bug 31226] New: Regression crash for alpha.core.CastSize and cplusplus.NewDelete
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Dec 1 08:26:37 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=31226
Bug ID: 31226
Summary: Regression crash for alpha.core.CastSize and
cplusplus.NewDelete
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: abramo.bagnara at bugseng.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
This is reproducible with 287363 while 275716 don't have such problem.
abramo at igor:~/bug$ cat z.cc
struct b2 {
int f;
};
struct b1 : virtual b2 {
void m();
};
struct d : b1, b2 {
};
void f() {
d *p = new d();
p->m();
}
abramo at igor:~/bug$ clang-4.0 -cc1 -triple i386-unknown-linux-gnu -analyze
-analyzer-checker=cplusplus.NewDelete,alpha.core.CastSize z.cc
z.cc:9:16: warning: direct base 'b2' is inaccessible due to ambiguity:
struct d -> struct b1 -> struct b2
struct d -> struct b2
struct d : b1, b2 {
^~
0 libLLVM-4.0.so.1 0x00007fe65485d1d8
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1 libLLVM-4.0.so.1 0x00007fe65485b34e llvm::sys::RunSignalHandlers() + 62
2 libLLVM-4.0.so.1 0x00007fe65485b49c
3 libpthread.so.0 0x00007fe656fd43e0
4 clang-4.0 0x00000000014e5d30
5 clang-4.0 0x000000000156a151
clang::ento::CheckerManager::runCheckersForStmt(bool,
clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet const&, clang::Stmt
const*, clang::ento::ExprEngine&, bool) + 881
6 clang-4.0 0x00000000015a29a4
clang::ento::ExprEngine::VisitCast(clang::CastExpr const*, clang::Expr const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) + 228
7 clang-4.0 0x000000000159dd65
clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*,
clang::ento::ExplodedNodeSet&) + 2277
8 clang-4.0 0x000000000159f424
clang::ento::ExprEngine::ProcessStmt(clang::CFGStmt,
clang::ento::ExplodedNode*) + 516
9 clang-4.0 0x000000000159f6a1
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
289
10 clang-4.0 0x00000000015707ce
clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock const*, unsigned int,
clang::ento::ExplodedNode*) + 94
11 clang-4.0 0x00000000015709b4
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 436
12 clang-4.0 0x00000000015714fd
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>) + 205
13 clang-4.0 0x0000000000d11d2f
14 clang-4.0 0x0000000000d126b0
15 clang-4.0 0x0000000000d1becd
16 clang-4.0 0x0000000000d203c8 clang::ParseAST(clang::Sema&, bool,
bool) + 792
17 clang-4.0 0x0000000000ae6d9e clang::FrontendAction::Execute() + 286
18 clang-4.0 0x0000000000ab8076
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 310
19 clang-4.0 0x0000000000b63cc2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2514
20 clang-4.0 0x00000000007a23a8 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 2392
21 clang-4.0 0x0000000000793ebe main + 7182
22 libc.so.6 0x00007fe6532fe830 __libc_start_main + 240
23 clang-4.0 0x00000000007a0749 _start + 41
Stack dump:
0. Program arguments: clang-4.0 -cc1 -triple i386-unknown-linux-gnu -analyze
-analyzer-checker=cplusplus.NewDelete,alpha.core.CastSize z.cc
1. <eof> parser at end of file
2. While analyzing stack:
#0 void f()
3. z.cc:14:3: Error evaluating statement
4. z.cc:14:3: Error evaluating statement
--
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/20161201/75b4507c/attachment-0001.html>
More information about the llvm-bugs
mailing list