http://llvm.org/bugs/show_bug.cgi?id=19278
Bug ID: 19278
Summary: Bus error in
ASTTemplateArgumentListInfo::initializeFrom
Product: clang
Version: 3.4
Hardware: Sun
OS: Solaris
Status: NEW
Severity: release blocker
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
File: llvm/tools/clang/lib/AST/TemplateBase.cpp
Config: LDFLAGS='-m32 -Wl,-R,/opt/swt/install/gcc-4.8.1/lib'
CXX=/opt/swt/install/gcc-4.8.1/bin/g++
CPP=/opt/swt/install/gcc-4.8.1/bin/cpp
CC=/opt/swt/install/gcc-4.8.1/bin/gcc
CXXFLAGS='-m32 -Wno-unused-local-typedefs -pthreads'
CFLAGS='-m32 -pthreads'
../llvm/configure
--enable-optimized
--prefix=.../install-sunos
--with-gcc-toolchain=/opt/swt/install/gcc-4.8.1
--enable-cxx11
--enable-bindings=none
Problem:
ASTTemplateArgumentListInfo::Create allocates memory for an
ASTTemplateArgumentListInfo object by calling ASTContext::Allocate with a
second parameter of llvm::alignOf<ASTTemplateArgumentListInfo>().
ASTTemplateArgumentListInfo objects are allocated with extra memory, such that
they are followed by a contiguous sequence of TemplateArgumentLoc objects. It
happens with this configuration that the alignment of
ASTTemplateArgumentListInfo is 4 while the alignment of TemplateArgumentLoc is
8, so misaligned memory is allocated resulting in a bus error when the
TemplateArgumentLoc are accessed.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs