[llvm] r294572 - LVI: Fix use-of-uninitialized-value after r294463
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 14:15:42 PST 2017
I made this fix to avoid reverting the patch. If I'd reverted it very
likely author re-land it without the test for uninitialized variable. It
seems unreasonable to have test cases for each variable assignment.
On Fri, Feb 10, 2017 at 2:08 PM Philip Reames <listmail at philipreames.com>
wrote:
> Doesn't mean you shouldn't add a test case to "make check"
>
> On 02/10/2017 12:09 PM, Vitaly Buka wrote:
>
> That was detected by existing bots.
>
> On Fri, Feb 10, 2017 at 9:51 AM Philip Reames <listmail at philipreames.com>
> wrote:
>
> Test case?
>
> Philip
>
> On 02/09/2017 01:28 AM, Vitaly Buka via llvm-commits wrote:
> > Author: vitalybuka
> > Date: Thu Feb 9 03:28:05 2017
> > New Revision: 294572
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=294572&view=rev
> > Log:
> > LVI: Fix use-of-uninitialized-value after r294463
> >
> > BlockValueStack can be reallocated making reference e invalid.
> >
> > Modified:
> > llvm/trunk/lib/Analysis/LazyValueInfo.cpp
> >
> > Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=294572&r1=294571&r2=294572&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)
> > +++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Thu Feb 9 03:28:05 2017
> > @@ -677,7 +677,7 @@ void LazyValueInfoImpl::solve() {
> > BlockValueStack.clear();
> > return;
> > }
> > - std::pair<BasicBlock *, Value *> &e = BlockValueStack.back();
> > + std::pair<BasicBlock *, Value *> e = BlockValueStack.back();
> > assert(BlockValueSet.count(e) && "Stack value should be in
> BlockValueSet!");
> >
> > if (solveBlockValue(e.second, e.first)) {
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170210/cc7a3d0e/attachment.html>
More information about the llvm-commits
mailing list