<div dir="ltr">I've just encountered the same problem - it seems to be the last failure in UBSan bootstrap of check-llvm testsuite (and mailed <a href="http://reviews.llvm.org/D6908">http://reviews.llvm.org/D6908</a>).</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 8, 2015 at 2:06 PM, Artem Belevich <span dir="ltr"><<a href="mailto:tra@google.com" target="_blank">tra@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I've attached the patch.</div><div><br></div><div>The issue is that ubsan spotted a case where we extract 21 bits from a negative signed addend value in order to encode it into binary representation of reloc.</div><div><br></div><div>While behavior is harmless in this case, technically it does fall under undefined behavior. The patch extracts relevant bits into an unsigned variable first and then uses that unsigned value to shift bits around.</div><div><br></div><div>--Artem</div><div><br></div><div class="gmail_extra"><span class=""><div class="gmail_quote">On Thu, Jan 8, 2015 at 1:46 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">FYI, could you attach the patch file rather than including it inline, or post it using Phabricator[1]?<div><br></div><div>[1]: <a href="http://llvm.org/docs/Phabricator.html" target="_blank">http://llvm.org/docs/Phabricator.html</a></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote"><br></div></div></div></div></blockquote></div></span><span class="HOEnZb"><font color="#888888">-- <br><div><div dir="ltr">--Artem Belevich</div></div>
</font></span></div></div>
<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></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>