<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Feb 10, 2017 at 2:08 PM Philip Reames <<a href="mailto:listmail@philipreames.com">listmail@philipreames.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
<p class="gmail_msg">Doesn't mean you shouldn't add a test case to "make check"<br class="gmail_msg">
</p></div><div bgcolor="#FFFFFF" text="#000000" class="gmail_msg">
<br class="gmail_msg">
<div class="m_-3316002731591677019moz-cite-prefix gmail_msg">On 02/10/2017 12:09 PM, Vitaly Buka
wrote:<br class="gmail_msg">
</div>
<blockquote type="cite" class="gmail_msg">
<div dir="ltr" class="gmail_msg">That was detected by existing bots.</div>
<br class="gmail_msg">
<div class="gmail_quote gmail_msg">
<div dir="ltr" class="gmail_msg">On Fri, Feb 10, 2017 at 9:51 AM Philip Reames
<<a href="mailto:listmail@philipreames.com" class="gmail_msg" target="_blank">listmail@philipreames.com</a>>
wrote:<br class="gmail_msg">
</div>
<blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Test case?<br class="gmail_msg">
<br class="gmail_msg">
Philip<br class="gmail_msg">
<br class="gmail_msg">
On 02/09/2017 01:28 AM, Vitaly Buka via llvm-commits wrote:<br class="gmail_msg">
> Author: vitalybuka<br class="gmail_msg">
> Date: Thu Feb 9 03:28:05 2017<br class="gmail_msg">
> New Revision: 294572<br class="gmail_msg">
><br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=294572&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=294572&view=rev</a><br class="gmail_msg">
> Log:<br class="gmail_msg">
> LVI: Fix use-of-uninitialized-value after r294463<br class="gmail_msg">
><br class="gmail_msg">
> BlockValueStack can be reallocated making reference e
invalid.<br class="gmail_msg">
><br class="gmail_msg">
> Modified:<br class="gmail_msg">
> llvm/trunk/lib/Analysis/LazyValueInfo.cpp<br class="gmail_msg">
><br class="gmail_msg">
> Modified: llvm/trunk/lib/Analysis/LazyValueInfo.cpp<br class="gmail_msg">
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=294572&r1=294571&r2=294572&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyValueInfo.cpp?rev=294572&r1=294571&r2=294572&view=diff</a><br class="gmail_msg">
>
==============================================================================<br class="gmail_msg">
> --- llvm/trunk/lib/Analysis/LazyValueInfo.cpp (original)<br class="gmail_msg">
> +++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp Thu Feb 9
03:28:05 2017<br class="gmail_msg">
> @@ -677,7 +677,7 @@ void LazyValueInfoImpl::solve() {<br class="gmail_msg">
> BlockValueStack.clear();<br class="gmail_msg">
> return;<br class="gmail_msg">
> }<br class="gmail_msg">
> - std::pair<BasicBlock *, Value *> &e =
BlockValueStack.back();<br class="gmail_msg">
> + std::pair<BasicBlock *, Value *> e =
BlockValueStack.back();<br class="gmail_msg">
> assert(BlockValueSet.count(e) && "Stack
value should be in BlockValueSet!");<br class="gmail_msg">
><br class="gmail_msg">
> if (solveBlockValue(e.second, e.first)) {<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> llvm-commits mailing list<br class="gmail_msg">
> <a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote>
</div>
</blockquote>
<br class="gmail_msg">
</div></blockquote></div>