[llvm] r250117 - Fixed bugs in llvm-obdump while parsing Mach-O files from malformed archives

Rafael Espíndola via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 12:08:50 PDT 2015


On 13 October 2015 at 14:15, Kevin Enderby <enderby at apple.com> wrote:
> Hi Rafael,
>
> That is an excellent suggestion.  But I’m hoping to do a bit better coming up soon.  As this change was a bit of a stop gap solution to prevent a crash. I’ve been pushing a lot of malformed stuff through llvm’s libObject and see this and may other areas for improvement in its error handling.
>
> There are many places that we abort on malformed input or call report_fatal_error().  I would like to see better error checking up front with a bit more detailed messages like which object, archive member, which universal slice, which load command, or symbol table entry is causing the error.  This is similar to what is done with the native darwin tools.
>
> I hope to do this next and work with the team here at Apple to come up with a proposal and some good example code for Mach-O file to present to the LLVM community.
>
> I hope we’ll have something better soon,

While I am looking forward to the proposal, please change the stop gap
solution to use ErrorOr and drop isSizeValid for now.

Thanks,
Rafael


More information about the llvm-commits mailing list