[llvm] r243487 - [tests] Use llvm-readobj instead of macho-dump.
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 03:46:00 PDT 2015
On Wed, Aug 12, 2015 at 07:38:53PM -0700, Saleem Abdulrasool via llvm-commits wrote:
> > * Have good error messages. Right now most of the errors are just
> > "parse error". We can do a lot better by adding a diagnostic handler.
> > This is in my todo list.
> >
>
> Not to put words in Joerg's mouth, but I think that this would go a long
> way to alleviate his concern. If we can provide concrete messages of
> *what* went wrong, then the tool becomes significantly more invaluable,
> since it can analyse the failure.
Mostly. Consider a problem I had lately on ARM where the notes where not
correctly aligned. readelf is parsing it for a lot of operations -- and
crashed every time. Providing a good error message is a start for
diagnosing the error. If you see a problem, stop what you are doing
right now and see where you can safely resume parsing. We do that quite
well in clang, we should try to adopt a similar stance when dealing with
binary formats. There are different options here. For fixed size
records, continuing with the next record is normally OK. For variable
size records, depending on the problem bailing out and dealing with a
different part of the field may be the only option.
Joerg
More information about the llvm-commits
mailing list