[llvm] 02c1321 - [MC] Improve a report_fatal_error

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 18:43:51 PDT 2020


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).

Could you describe what it takes to reproduce this? Is it reliably
reproducible with (albeit bogus/broken) static inputs?

On Thu, Mar 26, 2020 at 6:37 PM Fangrui Song <i at maskray.me> wrote:

> There can't be a test case. If this error is ever triggered, it means
> something seriously broken happened.
>
> I ran into this once while playing with my -fno-semantic-interposition
> patches.
>
> On Thu, Mar 26, 2020 at 5:45 PM David Blaikie <dblaikie at gmail.com> wrote:
> >
> > Test case?
> >
> > On Mon, Jan 20, 2020 at 11:17 PM Fangrui Song via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >>
> >>
> >> Author: Fangrui Song
> >> Date: 2020-01-20T23:13:18-08:00
> >> New Revision: 02c1321139d61a9e56a5319a07bb8f27570e7f77
> >>
> >> URL:
> https://github.com/llvm/llvm-project/commit/02c1321139d61a9e56a5319a07bb8f27570e7f77
> >> DIFF:
> https://github.com/llvm/llvm-project/commit/02c1321139d61a9e56a5319a07bb8f27570e7f77.diff
> >>
> >> LOG: [MC] Improve a report_fatal_error
> >>
> >> Added:
> >>
> >>
> >> Modified:
> >>     llvm/lib/MC/ELFObjectWriter.cpp
> >>
> >> Removed:
> >>
> >>
> >>
> >>
> ################################################################################
> >> diff  --git a/llvm/lib/MC/ELFObjectWriter.cpp
> b/llvm/lib/MC/ELFObjectWriter.cpp
> >> index 6b4b45eb8eff..804f999a326a 100644
> >> --- a/llvm/lib/MC/ELFObjectWriter.cpp
> >> +++ b/llvm/lib/MC/ELFObjectWriter.cpp
> >> @@ -640,7 +640,7 @@ void ELFWriter::computeSymbolTable(
> >>        continue;
> >>
> >>      if (Symbol.isTemporary() && Symbol.isUndefined()) {
> >> -      Ctx.reportError(SMLoc(), "Undefined temporary symbol");
> >> +      Ctx.reportError(SMLoc(), "Undefined temporary symbol " +
> Symbol.getName());
> >>        continue;
> >>      }
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at lists.llvm.org
> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200326/708cf07e/attachment.html>


More information about the llvm-commits mailing list