]> granicus.if.org Git - clang/commit
Widen EHScope::ClenupBitFields::FixupDepth to avoid overflowing it (PR23490)
authorHans Wennborg <hans@hanshq.net>
Wed, 22 Jun 2016 16:21:14 +0000 (16:21 +0000)
committerHans Wennborg <hans@hanshq.net>
Wed, 22 Jun 2016 16:21:14 +0000 (16:21 +0000)
commit8fcedf2f6e16057437fc0e7f890c9dcbafae9911
treecfed54140ccda3c6ca0f6cb6b162bc2b1c53c37d
parent222836879511fa910a71f9c7f7ba8e658d4ceec9
Widen EHScope::ClenupBitFields::FixupDepth to avoid overflowing it (PR23490)

It currently only takes 2048 gotos to overflow the FixupDepth bitfield,
causing silent miscompilation. Apparently some parser generators run into
this (see PR).

I don't know that that data structure is terribly size sensitive anyway,
and since there's no room to widen the bitfield, let's just use a separate
word in EHCatchScope for it.

Differential Revision: http://reviews.llvm.org/D21566

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273434 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCleanup.h
test/CodeGen/fixup-depth-overflow.c [new file with mode: 0644]