[LLVMbugs] [Bug 13606] New: Clang crashes with large alignment attribute

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 14 12:41:20 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13606

             Bug #: 13606
           Summary: Clang crashes with large alignment attribute
           Product: clang
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: criswell at illinois.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9055
  --> http://llvm.org/bugs/attachment.cgi?id=9055
C source code to reproduce problem based on code from Baozeng

When using an alignment of 0x100000 on a global variable (see attached test
case), Clang asserts out with the following error:

clang: /home/criswell/src/llvm-trunk/tools/clang/lib/CodeGen/CGValue.h:162:
void clang::CodeGen::LValue::Initialize(clang::QualType, clang::Qualifiers,
clang::CharUnits, llvm::MDNode*): Assertion `this->Alignment ==
Alignment.getQuantity() && "Alignment exceeds allowed max!"' failed.


The problem appears to be that an LValue can only have an alignment that fits
within a short; increasing the data type size to a long will fix the problem.

This bug appears in both Clang 3.1 and Clang mainline (pre Clang 3.2).

-- 
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