[cfe-commits] [PATCH] Catching large array sizes

Aaron Ballman aaron at aaronballman.com
Sun Jul 22 11:50:07 PDT 2012


This patch is to address PR13271 -- the problem comes from declaring
an array that's "too large" within a structure, and then attempting to
take the sizeof that structure.  We have an assert in
ASTContext::getTypeInfoImpl about the size of constant arrays, but the
problem is that this is called when attempting to get the sizeof a
structure.  We've already reported the issue to the user about the
array being too large by this point, and so the assert triggers.

I'm not convinced the assert is required here, so I've removed it in
this patch.  However, I'm also not convinced the assert is invalid and
am open to suggestions as to other ways to handle the error.

~Aaron
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arraysize.patch
Type: application/octet-stream
Size: 1163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120722/feb3d09d/attachment.obj>


More information about the cfe-commits mailing list