<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Courier New;color: #000000;font-size: 10pt;">
<p>A colleague had already tried valgrind; no joy there because the crash</p>
<p>came about due to trying to destroy a DeductionFailure instance, which</p>
<p>is a normal member of OverloadCandidate and not dynamically allocated</p>
<p>on its own.</p>
<p> </p>
<p>After further research I agree that it is unexpected for FailureKind to be</p>
<p>nonzero when Viable is true; the constructor ought to have zeroed it. I am</p>
<p>looking for a smaller test case but no promises.</p>
<p>--paulr</p>
<p> </p>
<div style="FONT-FAMILY: Times New Roman; COLOR: #000000; FONT-SIZE: 16px">
<hr tabindex="-1">
<div style="DIRECTION: ltr" id="divRpF637801"><font color="#000000" size="2" face="Tahoma"><b>From:</b> metafoo@gmail.com [metafoo@gmail.com] on behalf of Richard Smith [richard@metafoo.co.uk]<br>
<b>Sent:</b> Wednesday, July 18, 2012 5:40 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> cfe-commits@cs.uiuc.edu<br>
<b>Subject:</b> Re: [cfe-commits] [PATCH] Fix random crasher<br>
</font><br>
</div>
<div></div>
<div>Yes, a reduced testcase would be very useful.<br>
<br>
<div class="gmail_quote">On Wed, Jul 18, 2012 at 5:27 PM, Robinson, Paul <span dir="ltr">
<<a href="mailto:Paul.Robinson@am.sony.com" target="_blank">Paul.Robinson@am.sony.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>
<div style="FONT-FAMILY: Courier New; DIRECTION: ltr; FONT-SIZE: 10pt">
<p>Thanks!</p>
<p> </p>
<p>I am not familiar with valgrind, but I suppose I could learn, if</p>
<p>there is still interest in a test case that triggers it.</p>
<p>--paulr</p>
<p> </p>
<div style="FONT-FAMILY: Times New Roman; FONT-SIZE: 16px">
<hr>
<div style="DIRECTION: ltr"><font color="#000000" face="Tahoma"><b>From:</b> <a href="mailto:metafoo@gmail.com" target="_blank">
metafoo@gmail.com</a> [<a href="mailto:metafoo@gmail.com" target="_blank">metafoo@gmail.com</a>] on behalf of Richard Smith [<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>]<br>
<b>Sent:</b> Wednesday, July 18, 2012 4:54 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<b>Subject:</b> Re: [cfe-commits] [PATCH] Fix random crasher<br>
</font><br>
</div>
<div>
<div class="h5">
<div></div>
<div>
<div class="gmail_quote">On Wed, Jul 18, 2012 at 4:51 PM, Richard Smith <span dir="ltr">
<<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="gmail_quote">
<div>On Wed, Jul 18, 2012 at 3:55 PM, Robinson, Paul <span dir="ltr"><<a href="mailto:Paul.Robinson@am.sony.com" target="_blank">Paul.Robinson@am.sony.com</a>></span> wrote:<br>
</div>
<div>
<div>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
Guard use of a possibly uninitialized field.<br>
<br>
This was causing very unpredictable compiler crashes. I have not<br>
provided a test because even our most reliable reproducer still failed<br>
less than 10% of the time.<br>
<br>
I really really really don't like sometimes-uninitialized fields<br>
guarded by flags. It is not a robust practice and took us a couple of<br>
weeks of poking at it to find the root cause. But it is how the rest<br>
of SemaOverload handles this field, so we fixed it using the<br>
prevailing practice in the module.<br>
</blockquote>
<div><br>
</div>
</div>
</div>
<div>Do you know where the uninitialized OverloadCandidate is coming from? The only place I can see one being created is in OverloadCandidateSet::addCandidate, which says:</div>
<div>
<div><br>
</div>
<div>      Candidates.push_back(OverloadCandidate());</div>
</div>
<div><br>
</div>
<div>This zero-initializes the OverloadCandidate object.</div>
</div>
</blockquote>
</div>
<br>
<div>I've checked in a variant on your change in r160470: it seems correct and appropriate even if FailureKind is always initialized, since we were previously implicitly and accidentally relying on ovl_fail_bad_deduction being nonzero.<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>