<div dir="ltr">Hi Dave,<div><br></div><div>The noisy error checking guarantees can only check code that's traversed at runtime, and this is the first time we'd traversed this particular error-dropping path.</div><div><br></div><div>Specifically: ORCRemoteTarget has an 'ExistingError' field that all clients were checking correctly, but when the constructor failed today (the first time this had happened) none of the clients got a copy of ORCRemoteTargetClient to check - it was destructed inside the ORCRemoteTargetClient::Create method, and its (unchecked) ExistingError field blew up.</div><div><br></div><div>I don't like the Error-as-member style that ORCRemoteTargetClient is using - I feel like it's prone to these kinds of mistakes, but I haven't got a better solution yet.</div><div><br></div><div>- Lang.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 3:35 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 dir="ltr">was there some reason this wasn't caught before by the noisy checked error handling?</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 2:29 PM, Lang Hames via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: lhames<br>
Date: Fri Apr 29 16:29:48 2016<br>
New Revision: 268111<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=268111&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=268111&view=rev</a><br>
Log:<br>
[Orc] Make sure we don't drop the internal error in OrcRemoteTargetClient when<br>
the constructor fails, as this would lead to an 'unchecked error' crash.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h<br>
<br>
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h?rev=268111&r1=268110&r2=268111&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h?rev=268111&r1=268110&r2=268111&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h (original)<br>
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h Fri Apr 29 16:29:48 2016<br>
@@ -693,8 +693,9 @@ private:<br>
       std::tie(RemoteTargetTriple, RemotePointerSize, RemotePageSize,<br>
                RemoteTrampolineSize, RemoteIndirectStubSize) = *RIOrErr;<br>
       Err = Error::success();<br>
-    } else<br>
-      Err = RIOrErr.takeError();<br>
+    } else {<br>
+      Err = joinErrors(RIOrErr.takeError(), std::move(ExistingError));<br>
+    }<br>
   }<br>
<br>
   Error deregisterEHFrames(TargetAddress Addr, uint32_t Size) {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>