<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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im">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 class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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>