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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 4 11:51:13 PST 2015


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

A broken .o/.a file is a really rare occurrence. Most of the time it
will mean the generator and consumer are out of sync. Very
infrequently it will mean a hardware error.

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

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

Taking one last look at the patch.

Cheers,
Rafael


More information about the llvm-commits mailing list