[LLVMbugs] [Bug 12865] New: clang Frontend crash with exit code 3

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri May 18 04:58:29 PDT 2012


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

             Bug #: 12865
           Summary: clang Frontend crash with exit code 3
           Product: clang
           Version: 3.0
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: novino at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Assertion failed: vlaSize && "no size for VLA!", file
..\..\..\..\..\tools\clang\lib\CodeGen\CodeGenFunction.cpp, line 89
clang: error: clang frontend command failed with exit code 3 (use -v to see
invocation)
------------------------------------------------------------------------------
Following is the reduced code which reproduces the issue.

int sample(void)
{
int a[5], i = 0;
  (typeof(++i, (int (*)[i])a)){&a} += 0;
}

------------------------------------------------------------------------------
Upon debugging it was found that it crashes due to null value for vlaSize.
This was because VLASizeMap was empty.

#Snippet from CodeGenFunction.cpp
<pre>
    elementType = type->getElementType();
    llvm::Value *vlaSize = VLASizeMap[type->getSizeExpr()];
    assert(vlaSize && "no size for VLA!");
</pre>

My Query is, where does VLASizeMap gets initialized/filled ?

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