[LLVMbugs] [Bug 19278] New: Bus error in ASTTemplateArgumentListInfo::initializeFrom

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 28 13:38:22 PDT 2014


            Bug ID: 19278
           Summary: Bus error in
           Product: clang
           Version: 3.4
          Hardware: Sun
                OS: Solaris
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hyrosen at mail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

File: llvm/tools/clang/lib/AST/TemplateBase.cpp
Config: LDFLAGS='-m32 -Wl,-R,/opt/swt/install/gcc-4.8.1/lib'
        CXXFLAGS='-m32 -Wno-unused-local-typedefs -pthreads'
        CFLAGS='-m32 -pthreads'

    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140328/d0f43c06/attachment.html>

More information about the llvm-bugs mailing list