The usual llvm regression tests for a standard constructor bug seems like an overkill, leading to many wasteful code exercises, such as ir reading, optimization, code generation, ...<div><br></div><div>Are there any other places to place the unit tests for classes in llvm code base?  Simply to test whether all the necessary fields are initialized after the copy constructor.</div>

<div><br></div><div><br><div class="gmail_quote">On Tue, Feb 26, 2013 at 10:51 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Tue, Feb 26, 2013 at 7:34 PM, Peng Cheng <<a href="mailto:gm4cheng@gmail.com">gm4cheng@gmail.com</a>> wrote:<br>
> It did not fail on any valgrind bots.  But when I used valgrind to check my<br>
> jit engine based on llvm, I found the bug.<br>
><br>
> Could you point to me an example of test case for the valgrind bot?  I need<br>
> to see how the test infrastructure is setup in llvm.<br>
<br>
</div>The current public valgrind bot (<br>
<a href="http://lab.llvm.org:8011/builders/clang-x86_64-linux-vg" target="_blank">http://lab.llvm.org:8011/builders/clang-x86_64-linux-vg</a> - there may be<br>
others) just runs the usual LLVM/Clang regression tests. So if you can<br>
construct a nice small/simple regression test you can add that (&<br>
limit the test to only running under valgrind, potentially)<br>
<div class="HOEnZb"><div class="h5"><br>
> On Tue, Feb 26, 2013 at 10:28 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br>
>><br>
>> On Tue, Feb 26, 2013 at 7:15 PM, Peng Cheng <<a href="mailto:gm4cheng@gmail.com">gm4cheng@gmail.com</a>> wrote:<br>
>> > The copy constructor of class DataLayout fails to initialize<br>
>> > StackNaturalAlign.  It could lead to conditional jump on uninitialized<br>
>> > variables in member function exceedsNaturalStackAlignment.<br>
>><br>
>> Does this fail any valgrind bots? Could you write a test case that<br>
>> would fail under valgrind?<br>
>><br>
>> > See fix in the patch attached.<br>
>> ><br>
>> > _______________________________________________<br>
>> > llvm-commits mailing list<br>
>> > <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
>> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>