aboutsummaryrefslogtreecommitdiff
path: root/tools/llvm-dis
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-04-24 23:40:05 +0000
committerBill Wendling <isanbard@gmail.com>2012-04-24 23:40:05 +0000
commite4f573fff8dd184bd525b80723747493178e608a (patch)
treec6ae1da20a40c6bb3ebea3ef2f8d5f017d91686b /tools/llvm-dis
parentad41289035ef6fda4d6eae1ff602aeb739d1c008 (diff)
Merging r155466:
------------------------------------------------------------------------ r155466 | chandlerc | 2012-04-24 11:42:47 -0700 (Tue, 24 Apr 2012) | 17 lines Fix a crash on valid (if UB) bitcode that is produced for some global constants in C++11 mode. I have no idea why it required such particular circumstances to get here, the code seems clearly to rely upon unchecked assumptions. Specifically, when we decide to form an index into a struct type, we may have gone through (at least one) zero-length array indexing round, which would have left the offset un-adjusted, and thus not necessarily valid for use when indexing the struct type. This is just an canonicalization step, so the correct thing is to refuse to canonicalize nonsensical GEPs of this form. Implemented, and test case added. Fixes PR12642. Pair debugged and coded with Richard Smith. =] I credit him with most of the debugging, and preventing me from writing the wrong code. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_31@155506 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dis')
0 files changed, 0 insertions, 0 deletions