On Mon, Jul 16, 2012 at 6:02 AM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank" class="cremed">alexfh@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><br><div class="gmail_quote"><div class="im">On Fri, Jul 13, 2012 at 3:06 PM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr" target="_blank" class="cremed">baldrick@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Alexander,<br>
<div>> Initializers for some fields were missing in Option::Option<br>
<br>
</div>did it matter?  If so, please add a testcase.  If not, why this change?<br></blockquote></div><div>This did matter. It caused random crashes in case cl::opt was a member of non-POD class.</div></div></div></blockquote>
<div><br></div><div>Hold on, a *member*? 'cl::opt' objects are supposed to be globals, not members.</div><div><br></div><div>Also, please get LLVM patches reviewed on llvm-commits, not cfe-commits.</div><div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><div> And I always considered it obvious that uninitialized data is bad. Don't you think so?</div>
</div></div></blockquote><div><br></div><div>No, uninitialized data is fine. It's *using* uninitialized data that is bad, and we have tools such as valgrind to detect those bugs. If you blindly initialize data, it prevents tools like valgrind from finding real bugs in code where data was read inappropriately.</div>
<div><br></div><div><br></div><div>A test case which fails under valgrind is the classic way of exercising bugs here if this is a bug.</div></div></div>