]> granicus.if.org Git - clang/commit
[CGCall] Fix potential invalid iterator decrement in findDominatingStoreToReturnValue.
authorAlexey Samsonov <vonosmas@gmail.com>
Fri, 12 Jun 2015 21:05:32 +0000 (21:05 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Fri, 12 Jun 2015 21:05:32 +0000 (21:05 +0000)
commit23ccad006d494cc5b254576929d288f6cc1e0190
treec8261c1550a5adde03c198f8749795dcfaa4bfbc
parent3cdc63e45e28c1ddc44ebd47ee70bbe62184b3f6
[CGCall] Fix potential invalid iterator decrement in findDominatingStoreToReturnValue.

If llvm.lifetime.end turns out to be the first instruction in the last
basic block, we can decrement the iterator twice, going past rend.
At the moment, this can never happen because llvm.lifetime.end always
goes immediately after bitcast, but relying on this is very brittle.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239638 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGCall.cpp