<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Regression crash for alpha.core.CastSize and cplusplus.NewDelete"
href="https://llvm.org/bugs/show_bug.cgi?id=31226">31226</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Regression crash for alpha.core.CastSize and cplusplus.NewDelete
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>kremenek@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>abramo.bagnara@bugseng.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>This is reproducible with 287363 while 275716 don't have such problem.
abramo@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@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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>