<div dir="ltr">We can still test broken things - if it's reachable by input. (generally report_fatal_error is for things that are at least reachable by external state (input, etc) rather than only internal code errors (which would be assertions) - but so weird/rare it's not quite worth having proper error handling for it).<br><br>Could you describe what it takes to reproduce this? Is it reliably reproducible with (albeit bogus/broken) static inputs?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 26, 2020 at 6:37 PM Fangrui Song <<a href="mailto:i@maskray.me">i@maskray.me</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">There can't be a test case. If this error is ever triggered, it means<br>
something seriously broken happened.<br>
<br>
I ran into this once while playing with my -fno-semantic-interposition patches.<br>
<br>
On Thu, Mar 26, 2020 at 5:45 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
><br>
> Test case?<br>
><br>
> On Mon, Jan 20, 2020 at 11:17 PM Fangrui Song via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
>><br>
>><br>
>> Author: Fangrui Song<br>
>> Date: 2020-01-20T23:13:18-08:00<br>
>> New Revision: 02c1321139d61a9e56a5319a07bb8f27570e7f77<br>
>><br>
>> URL: <a href="https://github.com/llvm/llvm-project/commit/02c1321139d61a9e56a5319a07bb8f27570e7f77" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/02c1321139d61a9e56a5319a07bb8f27570e7f77</a><br>
>> DIFF: <a href="https://github.com/llvm/llvm-project/commit/02c1321139d61a9e56a5319a07bb8f27570e7f77.diff" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/commit/02c1321139d61a9e56a5319a07bb8f27570e7f77.diff</a><br>
>><br>
>> LOG: [MC] Improve a report_fatal_error<br>
>><br>
>> Added:<br>
>><br>
>><br>
>> Modified:<br>
>>     llvm/lib/MC/ELFObjectWriter.cpp<br>
>><br>
>> Removed:<br>
>><br>
>><br>
>><br>
>> ################################################################################<br>
>> diff  --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp<br>
>> index 6b4b45eb8eff..804f999a326a 100644<br>
>> --- a/llvm/lib/MC/ELFObjectWriter.cpp<br>
>> +++ b/llvm/lib/MC/ELFObjectWriter.cpp<br>
>> @@ -640,7 +640,7 @@ void ELFWriter::computeSymbolTable(<br>
>>        continue;<br>
>><br>
>>      if (Symbol.isTemporary() && Symbol.isUndefined()) {<br>
>> -      Ctx.reportError(SMLoc(), "Undefined temporary symbol");<br>
>> +      Ctx.reportError(SMLoc(), "Undefined temporary symbol " + Symbol.getName());<br>
>>        continue;<br>
>>      }<br>
>><br>
>><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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>