<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 19, 2018, at 9:45 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Given that you were fixing a crash - that speaks to the existence of a test failure? But perhaps only in a linker-plugin situation & that's what's proving difficult to port into the LLVM test environment?<br class=""></div></div></blockquote><div><br class=""></div><div>Yep, no test failures.  This happens as one of our tools checks a file for being BC.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class="">I'd suggest checking to see if llvm-lto2 can reproduce the same codepath & failure, perhaps?<br class=""></div></div></blockquote><div><br class=""></div><div>I’ll poke around a bit more later, see if I can find something.</div><br class=""><blockquote type="cite" class=""><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Mar 19, 2018 at 9:43 AM Adam Nemet <<a href="mailto:anemet@apple.com" class="">anemet@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">I of course thought about that but I don’t know how.  I was trying to get inspiration from the large patch that added the buggy code in r254721 but that didn’t add a single testcase either :(.  I am open to hear ideas...</div><div style="word-wrap:break-word" class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 19, 2018, at 9:23 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class="m_1454284176943590830Apple-interchange-newline"><div class=""><div dir="ltr" class="">Test case?</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Mar 12, 2018 at 9:39 PM Adam Nemet via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: anemet<br class="">
Date: Mon Mar 12 21:37:01 2018<br class="">
New Revision: 327359<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=327359&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=327359&view=rev</a><br class="">
Log:<br class="">
[LTO] Return proper error object rather than null LTOModule<br class="">
<br class="">
This caused a crash in LTOModule::createInLocalContext.<br class="">
<br class="">
<a class="">rdar://37926841</a><br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/lib/LTO/LTOModule.cpp<br class="">
<br class="">
Modified: llvm/trunk/lib/LTO/LTOModule.cpp<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=327359&r1=327358&r2=327359&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=327359&r1=327358&r2=327359&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/lib/LTO/LTOModule.cpp (original)<br class="">
+++ llvm/trunk/lib/LTO/LTOModule.cpp Mon Mar 12 21:37:01 2018<br class="">
@@ -208,7 +208,7 @@ LTOModule::makeLTOModule(MemoryBufferRef<br class="">
   std::string errMsg;<br class="">
   const Target *march = TargetRegistry::lookupTarget(TripleStr, errMsg);<br class="">
   if (!march)<br class="">
-    return std::unique_ptr<LTOModule>(nullptr);<br class="">
+    return make_error_code(object::object_error::arch_not_found);<br class="">
<br class="">
   // construct LTOModule, hand over ownership of module and target<br class="">
   SubtargetFeatures Features;<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></div></blockquote></div>
</div></blockquote></div><br class=""></body></html>