[LLVMbugs] [Bug 8050] New: --experimental-checks: Assertion `D && "Cannot get layout of forward declarations!"
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Sep 1 04:53:16 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8050
Summary: --experimental-checks: Assertion `D && "Cannot get
layout of forward declarations!"
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: dimhen at gmail.com
CC: llvmbugs at cs.uiuc.edu
$ clang --version
clang version 2.8 (trunk 112697)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ cat tst.c
#include <stdlib.h>
struct S;
void foo(struct S **arg)
{
*arg = malloc(1);
}
$ clang -cc1 tst.c -analyze -analyzer-check-objc-mem
-analyzer-experimental-internal-checks -analyzer-experimental-checks
clang: RecordLayoutBuilder.cpp:1502: const clang::ASTRecordLayout&
clang::ASTContext::getASTRecordLayout(const clang::RecordDecl*): Assertion `D
&& "Cannot get layout of forward declarations!"' failed.
0 clang 0x000000000134c74f
1 clang 0x000000000134e7ba
2 libpthread.so.0 0x00000032c4e0f0f0
3 libc.so.6 0x00000032c46326c5 gsignal + 53
4 libc.so.6 0x00000032c4633ea5 abort + 373
5 libc.so.6 0x00000032c462b7b5 __assert_fail + 245
6 clang 0x0000000000bdeb53
clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) + 1523
7 clang 0x0000000000b5c54f
clang::ASTContext::getTypeInfo(clang::Type const*) + 1807
8 clang 0x0000000000b5c823
clang::ASTContext::getTypeSizeInChars(clang::QualType) + 51
9 clang 0x0000000000af7cc2
10 clang 0x0000000000a7e5ef
clang::GRExprEngine::CheckerVisit(clang::Stmt const*, clang::ExplodedNodeSet&,
clang::ExplodedNodeSet&, clang::GRExprEngine::CallbackKind) + 575
11 clang 0x0000000000a89cab
clang::GRExprEngine::VisitCast(clang::CastExpr const*, clang::Expr const*,
clang::ExplodedNode*, clang::ExplodedNodeSet&, bool) + 1867
12 clang 0x0000000000a81a46 clang::GRExprEngine::Visit(clang::Stmt
const*, clang::ExplodedNode*, clang::ExplodedNodeSet&) + 566
13 clang 0x0000000000a86543
clang::GRExprEngine::VisitBinaryOperator(clang::BinaryOperator const*,
clang::ExplodedNode*, clang::ExplodedNodeSet&, bool) + 691
14 clang 0x0000000000a82015 clang::GRExprEngine::Visit(clang::Stmt
const*, clang::ExplodedNode*, clang::ExplodedNodeSet&) + 2053
15 clang 0x0000000000a8b79e
clang::GRExprEngine::ProcessStmt(clang::CFGElement, clang::GRStmtNodeBuilder&)
+ 846
16 clang 0x0000000000a77147
clang::GRCoreEngine::HandlePostStmt(clang::PostStmt const&, clang::CFGBlock
const*, unsigned int, clang::ExplodedNode*) + 167
17 clang 0x0000000000a77698
clang::GRCoreEngine::ExecuteWorkList(clang::LocationContext const*, unsigned
int, clang::GRState const*) + 952
18 clang 0x0000000000a1ec48
19 clang 0x0000000000a1f851
20 clang 0x0000000000a1fbf2
21 clang 0x0000000000811fdd clang::ParseAST(clang::Sema&, bool) + 301
22 clang 0x00000000006077dd
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 349
23 clang 0x00000000005e8d8c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
24 clang 0x00000000005dfb91 cc1_main(char const**, char const**, char
const*, void*) + 417
25 clang 0x00000000005e7883 main + 4051
26 libc.so.6 0x00000032c461eb1d __libc_start_main + 253
27 clang 0x00000000005df7f9
Stack dump:
0. Program arguments: clang -cc1 tst.c -analyze -analyzer-check-objc-mem
-analyzer-experimental-internal-checks -analyzer-experimental-checks
1. <eof> parser at end of file
2. tst.c:6:5: Error evaluating statement
3. tst.c:6:5: Error evaluating statement
4. tst.c:6:12: Error evaluating statement
Aborted (core dumped)
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list