[LLVMbugs] [Bug 8519] New: Field offset not at char boundary!
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Nov 1 00:22:00 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=8519
Summary: Field offset not at char boundary!
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: wendling at apple.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
This is from a self-compilation with clang r117907:
$ /Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 \
-emit-obj -mrelax-all -disable-free -main-file-name FrontendAction.cpp
-pic-level 1 -mdisable-fp-elim \
-relaxed-aliasing -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 97.14 -g \
-resource-dir
/Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/../lib/clang/2.9
-dependency-file \
/Users/void/llvm/llvm.obj/tools/clang/lib/Frontend/Debug+Asserts/FrontendAction.d.tmp
-MP -MT \
/Users/void/llvm/llvm.obj/tools/clang/lib/Frontend/Debug+Asserts/FrontendAction.o
-MT \
/Users/void/llvm/llvm.obj/tools/clang/lib/Frontend/Debug+Asserts/FrontendAction.d
-D _DEBUG -D _GNU_SOURCE \
-D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I
/Users/void/llvm/llvm.obj/include \
-I /Users/void/llvm/llvm.obj/tools/clang/lib/Frontend -I
/Users/void/llvm/llvm.src/include \
-I /Users/void/llvm/llvm.src/tools/clang/lib/Frontend \
-I /Users/void/llvm/llvm.src/tools/clang/lib/Frontend/../../include \
-I /Users/void/llvm/llvm.obj/tools/clang/lib/Frontend/../../include
-Woverloaded-virtual -Wcast-qual \
-Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic
-ferror-limit 19 \
-fmessage-length 124 -stack-protector 1 -fblocks -fno-rtti -fno-common
-fdiagnostics-show-option \
-fcolor-diagnostics /Users/void/llvm/FrontendAction.ii -x c++
Assertion failed: (FieldOffset % CharWidth == 0 && "Field offset not at char
boundary!"), function getFieldOffset, file
/Users/void/llvm/llvm-tot.src/tools/clang/lib/AST/RecordLayoutBuilder.cpp, line
98.
0 clang 0x00000001013f1c32 PrintStackTrace(void*) + 34
1 clang 0x00000001013f2a83 SignalHandler(int) + 707
2 libSystem.B.dylib 0x00007fff8439435a _sigtramp + 26
3 libSystem.B.dylib 0x00007fff5fbfae10 _sigtramp + 3683019472
4 clang 0x0000000100017842 __assert_rtn + 66
5 clang 0x00000001007c6fb4 (anonymous
namespace)::EmptySubobjectMap::UpdateEmptyFieldSubobjects(clang::CXXRecordDecl
const*, clang::CXXRecordDecl const*, clang::CharUnits) + 1284
6 clang 0x00000001007c70da (anonymous
namespace)::EmptySubobjectMap::UpdateEmptyFieldSubobjects(clang::FieldDecl
const*, clang::CharUnits) + 106
7 clang 0x00000001007c7eeb (anonymous
namespace)::RecordLayoutBuilder::LayoutField(clang::FieldDecl const*) + 1403
8 clang 0x00000001007c88da (anonymous
namespace)::RecordLayoutBuilder::LayoutFields(clang::RecordDecl const*) + 58
9 clang 0x00000001007c2b62 (anonymous
namespace)::RecordLayoutBuilder::Layout(clang::CXXRecordDecl const*) + 50
10 clang 0x00000001007c3bae
clang::ASTContext::getASTRecordLayout(clang::RecordDecl const*) + 2798
11 clang 0x00000001002622dc
clang::CodeGen::CGRecordLayoutBuilder::Layout(clang::RecordDecl const*) + 28
12 clang 0x0000000100262f77
clang::CodeGen::CodeGenTypes::ComputeRecordLayout(clang::RecordDecl const*) +
263
13 clang 0x00000001002a9f6c
clang::CodeGen::CodeGenTypes::ConvertTagDeclType(clang::TagDecl const*) + 1484
14 clang 0x00000001002a844b
clang::CodeGen::CodeGenTypes::ConvertNewType(clang::QualType) + 1195
15 clang 0x00000001002a9435
clang::CodeGen::CodeGenTypes::ConvertTypeRecursive(clang::QualType) + 437
16 clang 0x00000001002aa8b8
clang::CodeGen::CodeGenTypes::ConvertType(clang::QualType, bool) + 24
17 clang 0x00000001002aaa72
clang::CodeGen::CodeGenTypes::ConvertTypeForMem(clang::QualType, bool) + 34
18 clang 0x00000001002aab22
clang::CodeGen::CodeGenTypes::HandleLateResolvedPointers() + 66
19 clang 0x0000000100192a23
clang::CodeGen::CodeGenTypes::getFunctionInfo(clang::CanQual<clang::Type>,
llvm::SmallVectorImpl<clang::CanQual<clang::Type> > const&,
clang::FunctionType::ExtInfo const&, bool) + 1331
20 clang 0x00000001001935e2
clang::CodeGen::CodeGenTypes::getFunctionInfo(clang::CXXConstructorDecl const*,
clang::CXXCtorType) + 562
21 clang 0x000000010018ece0
clang::CodeGen::CodeGenModule::GetAddrOfCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 192
22 clang 0x000000010018f358
clang::CodeGen::CodeGenModule::EmitCXXConstructor(clang::CXXConstructorDecl
const*, clang::CXXCtorType) + 136
23 clang 0x00000001002a163a
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::CodeGen::GlobalDecl)
+ 362
24 clang 0x00000001002a17d6
clang::CodeGen::CodeGenModule::EmitGlobal(clang::CodeGen::GlobalDecl) + 150
25 clang 0x000000010018dfc8
clang::CodeGen::CodeGenModule::EmitCXXConstructors(clang::CXXConstructorDecl
const*) + 40
26 clang 0x00000001002a2489
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 1017
27 clang 0x00000001002c48cc (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 60
28 clang 0x000000010028c56b (anonymous
namespace)::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 155
29 clang 0x00000001002d0af6 clang::ParseAST(clang::Sema&, bool) +
182
30 clang 0x000000010028cdec clang::CodeGenAction::ExecuteAction() +
60
31 clang 0x000000010004e169
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 393
32 clang 0x00000001000211ce
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1614
33 clang 0x00000001000191e3 cc1_main(char const**, char const**,
char const*, void*) + 515
34 clang 0x0000000100020154 main + 4884
35 clang 0x0000000100017bb8 start + 52
Stack dump:
0. Program arguments:
/Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/clang -cc1 -triple
x86_64-apple-darwin10.0.0 -emit-obj -mrelax-all -disable-free -main-file-name
FrontendAction.cpp -pic-level 1 -mdisable-fp-elim -relaxed-aliasing
-masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 97.14 -g
-resource-dir
/Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/../lib/clang/2.9
-dependency-file
/Users/void/llvm/llvm.obj/tools/clang/lib/Frontend/Debug+Asserts/FrontendAction.d.tmp
-MP -MT
/Users/void/llvm/llvm.obj/tools/clang/lib/Frontend/Debug+Asserts/FrontendAction.o
-MT
/Users/void/llvm/llvm.obj/tools/clang/lib/Frontend/Debug+Asserts/FrontendAction.d
-D _DEBUG -D _GNU_SOURCE -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I
/Users/void/llvm/llvm.obj/include -I
/Users/void/llvm/llvm.obj/tools/clang/lib/Frontend -I
/Users/void/llvm/llvm.src/include -I
/Users/void/llvm/llvm.src/tools/clang/lib/Frontend -I
/Users/void/llvm/llvm.src/tools/clang/lib/Frontend/../../include -I
/Users/void/llvm/llvm.obj/tools/clang/lib/Frontend/../../include
-Woverloaded-virtual -Wcast-qual -Wno-long-long -Wall -W -Wno-unused-parameter
-Wwrite-strings -pedantic -ferror-limit 19 -fmessage-length 124
-stack-protector 1 -fblocks -fno-rtti -fno-common -fdiagnostics-show-option
-fcolor-diagnostics /Users/void/llvm/FrontendAction.ii -x c++
1.
/Users/void/llvm/llvm.src/tools/clang/lib/Frontend/FrontendAction.cpp:79:1:
current parser token 'FrontendAction'
2.
/Users/void/llvm/llvm.src/tools/clang/lib/Frontend/FrontendAction.cpp:77:17:
LLVM IR generation of declaration 'clang::FrontendAction::FrontendAction'
3.
/Users/void/llvm/llvm.src/tools/clang/lib/Frontend/FrontendAction.cpp:77:17:
Generating code for declaration 'clang::FrontendAction::FrontendAction'
Illegal instruction
--
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