[llvm] r241255 - Improve error message.

David Blaikie dblaikie at gmail.com
Thu Jul 2 09:32:05 PDT 2015


On Thu, Jul 2, 2015 at 9:28 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com
> wrote:

> On 2 July 2015 at 12:21, David Blaikie <dblaikie at gmail.com> wrote:
> >
> >
> > On Thu, Jul 2, 2015 at 4:48 AM, Rafael Espindola
> > <rafael.espindola at gmail.com> wrote:
> >>
> >> Author: rafael
> >> Date: Thu Jul  2 06:48:48 2015
> >> New Revision: 241255
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=241255&view=rev
> >> Log:
> >> Improve error message.
> >>
> >> Thanks to Sean Silva for the suggestion.
> >>
> >> Modified:
> >>     llvm/trunk/include/llvm/Object/ELF.h
> >>     llvm/trunk/test/Object/invalid.test
> >>
> >> Modified: llvm/trunk/include/llvm/Object/ELF.h
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELF.h?rev=241255&r1=241254&r2=241255&view=diff
> >>
> >>
> ==============================================================================
> >> --- llvm/trunk/include/llvm/Object/ELF.h (original)
> >> +++ llvm/trunk/include/llvm/Object/ELF.h Thu Jul  2 06:48:48 2015
> >> @@ -765,7 +765,8 @@ uint64_t ELFFile<ELFT>::getSymbolIndex(c
> >>  template <class ELFT>
> >>  const typename ELFFile<ELFT>::Elf_Shdr *ELFFile<ELFT>::section_begin()
> >> const {
> >>    if (Header->e_shentsize != sizeof(Elf_Shdr))
> >> -    report_fatal_error("Invalid section header size");
> >> +    report_fatal_error(
> >> +        "Invalid section header entry size (e_shentsize) in ELF
> header");
> >
> >
> > Vaguely: Don't we need things in libObject to be non-fatal, since it's
> used
> > as a library in programs that might want to not crash/abort on failure, I
> > would imagine?
>
> Yes. We need to have a proper diagnostic handler in place.
>
> This at least went from silently ignoring the error to reporting it. I
> will clean this all up, but there is a lot to do and this was a step
> in the right direction.
>

Sure thing - thanks for the context/details!


>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150702/fd558a20/attachment.html>


More information about the llvm-commits mailing list