[PATCH] D25518: [ELF] - Handle broken size field of compressed sections header.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 10:39:29 PDT 2016


ruiu added a comment.

Our current policy is essentially to trust file contents but reject silly apparent errors. We are not trying to recover from all possible crashes (and this patch doesn't save the linker from crashing neither -- but instead it makes the linker to kill itself after printing out an error message.) Naturally, there are a lot of places left we can add error checking, but in most places we don't as a policy. When you add a check like this, I think you want to show that why this is special among other possible errors. Otherwise, we'd have tons of error checks in our code base and still the linker crashes for broken inputs.

As to 32-bit hosts, I think we want to support it, because, why not? You cannot create >4GB binary on 32 bit, but as long as it is smaller than a few gigs, LLD should work fine.


https://reviews.llvm.org/D25518





More information about the llvm-commits mailing list