[PATCH] D13989: This removes the eating of the error in Archive::Child::getSize() when the charactersin the size field in the archive header for the member is not a number.

Kevin Enderby via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 12:15:51 PST 2015


> On Nov 4, 2015, at 11:51 AM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> 
>>> On Oct 13, 2015, at 2:23 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>>> 
>>> Ideally we want to push them up until we get out of lib, at which
>>> point we are in tools and can handle the error in whatever way is
>>> appropriate for that tool.
>> 
>> 
>> to mean that once the error was pushed out of the lib the tool could really could handle the error in whatever way is appropriate for that tool, including eating the error and ignoring it.
> 
> I honestly don't think that is appropriate. Ever.

OK, I respect your opinion.

> 
> A broken .o/.a file is a really rare occurrence.

Not for me.  As a developer of object file tools I often find myself trying to figure out why a binary is broken.  Having tools that simply give up and not print any data I personally don’t find useful.

> Most of the time it
> will mean the generator and consumer are out of sync. Very
> infrequently it will mean a hardware error.

Often times it is a disk has filled up and a file got truncated in a build.  Then it gets used building something else which fails to build.

> Given that it is an error, I think we *must* exit with non zero status.

Again I respect your opinion.  But I disagree.  The exit status in not interesting to me but I can live with a non zero status when there are errors if that is what is acceptable.  To me this is just normal occurrence of inspecting a binary.  The tool’s good error messages as to what is incorrect about the binary is what I find invaluable to do my job.

> Given that it is a really uncommon case, I think we should make the
> handling in tools as simple as possible: if at all possible, just
> exit(1).

Again I respect your opinion.  But I disagree. Most of my time is spent looking at things that are broken.  Things that work and are correct I spend very little time with.

> Taking one last look at the patch.

Thanks you.  I will get on updating the patch after lunch with your latest comments.

> 
> Cheers,
> Rafael



More information about the llvm-commits mailing list